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

Function clear_pathspec

pathspec.c:747–765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

745}
746
747void 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
767int match_pathspec_attrs(struct index_state *istate,
768 const char *name, int namelen,

Callers 15

preload_indexFunction · 0.85
queue_diffsFunction · 0.85
is_tree_submodule_activeFunction · 0.85
try_to_follow_renamesFunction · 0.85
path_existsFunction · 0.85
write_archiveFunction · 0.85
prepare_show_mergeFunction · 0.85
release_revisionsFunction · 0.85
diff_tree_combinedFunction · 0.85
diff_no_indexFunction · 0.85
run_patchFunction · 0.85
diff_freeFunction · 0.85

Calls 1

attr_check_freeFunction · 0.85

Tested by

no test coverage detected