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

Function string_list_clear

string-list.c:164–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void string_list_clear(struct string_list *list, int free_util)
165{
166 if (list->items) {
167 if (list->strdup_strings) {
168 for (size_t i = 0; i < list->nr; i++)
169 free(list->items[i].string);
170 }
171 if (free_util) {
172 for (size_t i = 0; i < list->nr; i++)
173 free(list->items[i].util);
174 }
175 free(list->items);
176 }
177 list->items = NULL;
178 list->nr = list->alloc = 0;
179}
180
181void string_list_clear_func(struct string_list *list, string_list_clear_func_t clearfunc)
182{

Callers 15

config_with_optionsFunction · 0.85
git_configset_clearFunction · 0.85
clear_repository_formatFunction · 0.85
do_fetch_pack_v2Function · 0.85
finish_delayed_checkoutFunction · 0.85
pretty_print_cmdnamesFunction · 0.85

Calls

no outgoing calls

Tested by 15

cmd_mainFunction · 0.68
cmd__progressFunction · 0.68
cmd__parse_optionsFunction · 0.68
parse_flagsFunction · 0.68
cmd_delete_refsFunction · 0.68
print_sorted_commit_idsFunction · 0.68
cmd__pack_deltasFunction · 0.68
cmd__hashmapFunction · 0.68
scriptedFunction · 0.68
testsuiteFunction · 0.68