MCPcopy Create free account
hub / github.com/git/git / is_excluded

Function is_excluded

dir.c:1831–1839  ·  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 1 if true, otherwise 0. */

Source from the content-addressed store, hash-verified

1829 * Returns 1 if true, otherwise 0.
1830 */
1831int is_excluded(struct dir_struct *dir, struct index_state *istate,
1832 const char *pathname, int *dtype_p)
1833{
1834 struct path_pattern *pattern =
1835 last_matching_pattern(dir, istate, pathname, dtype_p);
1836 if (pattern)
1837 return pattern->flags & PATTERN_FLAG_NEGATIVE ? 0 : 1;
1838 return 0;
1839}
1840
1841static struct dir_entry *dir_entry_new(const char *pathname, int len)
1842{

Callers 5

check_ok_to_removeFunction · 0.85
treat_pathFunction · 0.85
ce_excludedFunction · 0.85
cmd_addFunction · 0.85
filter_by_patterns_cmdFunction · 0.85

Calls 1

last_matching_patternFunction · 0.85

Tested by

no test coverage detected