* 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. */
| 1806 | * undecided. |
| 1807 | */ |
| 1808 | struct 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 |
no test coverage detected