MCPcopy Index your code
hub / github.com/git/git / last_matching_pattern

Function last_matching_pattern

dir.c:1808–1824  ·  view source on GitHub ↗

* Loads the exclude lists for the directory containing pathname, then * scans all exclude lists to determine whether pathname is excluded. * Returns the exclude_list element which matched, or NULL for * undecided. */

Source from the content-addressed store, hash-verified

1806 * undecided.
1807 */
1808struct path_pattern *last_matching_pattern(struct dir_struct *dir,
1809 struct index_state *istate,
1810 const char *pathname,
1811 int *dtype_p)
1812{
1813 int pathlen = strlen(pathname);
1814 const char *basename = strrchr(pathname, '/');
1815 basename = (basename) ? basename+1 : pathname;
1816
1817 prep_exclude(dir, istate, pathname, basename-pathname);
1818
1819 if (dir->internal.pattern)
1820 return dir->internal.pattern;
1821
1822 return last_matching_pattern_from_lists(dir, istate, pathname, pathlen,
1823 basename, dtype_p);
1824}
1825
1826/*
1827 * Loads the exclude lists for the directory containing pathname, then

Callers 2

is_excludedFunction · 0.85
check_ignoreFunction · 0.85

Calls 2

prep_excludeFunction · 0.85

Tested by

no test coverage detected