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

Function clear_pattern_list

dir.c:1016–1027  ·  view source on GitHub ↗

* Frees memory within pl which was allocated for exclude patterns and * the file buffer. Does not free pl itself. */

Source from the content-addressed store, hash-verified

1014 * the file buffer. Does not free pl itself.
1015 */
1016void clear_pattern_list(struct pattern_list *pl)
1017{
1018 int i;
1019
1020 for (i = 0; i < pl->nr; i++)
1021 free(pl->patterns[i]);
1022 free(pl->patterns);
1023 clear_pattern_entry_hashmap(&pl->recursive_hashmap);
1024 clear_pattern_entry_hashmap(&pl->parent_hashmap);
1025
1026 memset(pl, 0, sizeof(*pl));
1027}
1028
1029static void trim_trailing_spaces(char *buf)
1030{

Callers 15

unpack_treesFunction · 0.85
update_sparsityFunction · 0.85
prep_excludeFunction · 0.85
dir_clearFunction · 0.85
filter_sparse_freeFunction · 0.85
release_indexFunction · 0.85
prepare_filters_oneFunction · 0.85
path_walk_info_clearFunction · 0.85
cmd__path_walkFunction · 0.85
sparse_checkout_listFunction · 0.85
update_working_directoryFunction · 0.85

Calls 1

Tested by 1

cmd__path_walkFunction · 0.68