MCPcopy Create free account
hub / github.com/git/git / remove_dir_entry

Function remove_dir_entry

name-hash.c:103–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103static void remove_dir_entry(struct index_state *istate, struct cache_entry *ce)
104{
105 /*
106 * Release reference to the directory entry. If 0, remove and continue
107 * with parent directory.
108 */
109 struct dir_entry *dir = hash_dir_entry(istate, ce, ce_namelen(ce));
110 while (dir && !(--dir->nr)) {
111 struct dir_entry *parent = dir->parent;
112 hashmap_remove(&istate->dir_hash, &dir->ent, NULL);
113 free(dir);
114 dir = parent;
115 }
116}
117
118static void hash_index_entry(struct index_state *istate, struct cache_entry *ce)
119{

Callers 1

remove_name_hashFunction · 0.85

Calls 2

hash_dir_entryFunction · 0.85
hashmap_removeFunction · 0.85

Tested by

no test coverage detected