| 745 | } |
| 746 | |
| 747 | void clear_pathspec(struct pathspec *pathspec) |
| 748 | { |
| 749 | int i, j; |
| 750 | |
| 751 | for (i = 0; i < pathspec->nr; i++) { |
| 752 | free(pathspec->items[i].match); |
| 753 | free(pathspec->items[i].original); |
| 754 | |
| 755 | for (j = 0; j < pathspec->items[i].attr_match_nr; j++) |
| 756 | free(pathspec->items[i].attr_match[j].value); |
| 757 | free(pathspec->items[i].attr_match); |
| 758 | |
| 759 | if (pathspec->items[i].attr_check) |
| 760 | attr_check_free(pathspec->items[i].attr_check); |
| 761 | } |
| 762 | |
| 763 | FREE_AND_NULL(pathspec->items); |
| 764 | pathspec->nr = 0; |
| 765 | } |
| 766 | |
| 767 | int match_pathspec_attrs(struct index_state *istate, |
| 768 | const char *name, int namelen, |
no test coverage detected