| 1622 | } |
| 1623 | |
| 1624 | static struct path_pattern *last_matching_pattern_from_lists( |
| 1625 | struct dir_struct *dir, struct index_state *istate, |
| 1626 | const char *pathname, int pathlen, |
| 1627 | const char *basename, int *dtype_p) |
| 1628 | { |
| 1629 | int i, j; |
| 1630 | struct exclude_list_group *group; |
| 1631 | struct path_pattern *pattern; |
| 1632 | for (i = EXC_CMDL; i <= EXC_FILE; i++) { |
| 1633 | group = &dir->internal.exclude_list_group[i]; |
| 1634 | for (j = group->nr - 1; j >= 0; j--) { |
| 1635 | pattern = last_matching_pattern_from_list( |
| 1636 | pathname, pathlen, basename, dtype_p, |
| 1637 | &group->pl[j], istate); |
| 1638 | if (pattern) |
| 1639 | return pattern; |
| 1640 | } |
| 1641 | } |
| 1642 | return NULL; |
| 1643 | } |
| 1644 | |
| 1645 | /* |
| 1646 | * Loads the per-directory exclude list for the substring of base |
no test coverage detected