diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-11-11 12:56:29 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-11 12:56:29 -0800 |
commit | 6d37ca21651408b6d29b86a67d0179eb98629fd8 (patch) | |
tree | 7c8fdc0b3fc36eafed68e1309bd23690726c6673 /name-hash.c | |
parent | merge,rebase,revert: select ort or recursive by config or environment (diff) | |
parent | shortlog: use strset from strmap.h (diff) | |
download | tgif-6d37ca21651408b6d29b86a67d0179eb98629fd8.tar.xz |
Merge branch 'en/strmap' into en/merge-ort-impl
* en/strmap:
shortlog: use strset from strmap.h
Use new HASHMAP_INIT macro to simplify hashmap initialization
strmap: take advantage of FLEXPTR_ALLOC_STR when relevant
strmap: enable allocations to come from a mem_pool
strmap: add a strset sub-type
strmap: split create_entry() out of strmap_put()
strmap: add functions facilitating use as a string->int map
strmap: enable faster clearing and reusing of strmaps
strmap: add more utility functions
strmap: new utility functions
hashmap: provide deallocation function names
hashmap: introduce a new hashmap_partial_clear()
hashmap: allow re-use after hashmap_free()
hashmap: adjust spacing to fix argument alignment
hashmap: add usage documentation explaining hashmap_free[_entries]()
Diffstat (limited to 'name-hash.c')
-rw-r--r-- | name-hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/name-hash.c b/name-hash.c index fb526a3775..5d3c7b12c1 100644 --- a/name-hash.c +++ b/name-hash.c @@ -726,6 +726,6 @@ void free_name_hash(struct index_state *istate) return; istate->name_hash_initialized = 0; - hashmap_free(&istate->name_hash); - hashmap_free_entries(&istate->dir_hash, struct dir_entry, ent); + hashmap_clear(&istate->name_hash); + hashmap_clear_and_free(&istate->dir_hash, struct dir_entry, ent); } |