| 101 | } |
| 102 | |
| 103 | static 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 | |
| 118 | static void hash_index_entry(struct index_state *istate, struct cache_entry *ce) |
| 119 | { |
no test coverage detected