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

Function git_configset_clear

config.c:1802–1820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1800}
1801
1802void git_configset_clear(struct config_set *set)
1803{
1804 struct config_set_element *entry;
1805 struct hashmap_iter iter;
1806 if (!set->hash_initialized)
1807 return;
1808
1809 hashmap_for_each_entry(&set->config_hash, &iter, entry,
1810 ent /* member name */) {
1811 free(entry->key);
1812 string_list_clear(&entry->value_list, 1);
1813 }
1814 hashmap_clear_and_free(&set->config_hash, struct config_set_element, ent);
1815 set->hash_initialized = 0;
1816 free(set->list.items);
1817 set->list.nr = 0;
1818 set->list.alloc = 0;
1819 set->list.items = NULL;
1820}
1821
1822static int config_set_callback(const char *key, const char *value,
1823 const struct config_context *ctx,

Callers 9

repo_read_configFunction · 0.85
repo_config_clearFunction · 0.85
is_main_worktree_bareFunction · 0.85
init_worktree_configFunction · 0.85
repo_clearFunction · 0.85
libgit_configset_freeFunction · 0.85
cmd__configFunction · 0.85
maintenance_unregisterFunction · 0.85

Calls 1

string_list_clearFunction · 0.85

Tested by 1

cmd__configFunction · 0.68