summaryrefslogtreecommitdiff
path: root/ref-filter.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-21 23:14:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-21 23:14:38 (GMT)
commitbf0a430f70b53f94454692c9ae8ddadd18891aaa (patch)
tree0f55c315bc012df4f7fe235f1606b931625833d3 /ref-filter.c
parentd5e35329dd5305d611478e8d5076a8ca75e25f0d (diff)
parent449a900969d0f060d054e5a13084bed318da3a31 (diff)
downloadgit-bf0a430f70b53f94454692c9ae8ddadd18891aaa.zip
git-bf0a430f70b53f94454692c9ae8ddadd18891aaa.tar.gz
git-bf0a430f70b53f94454692c9ae8ddadd18891aaa.tar.bz2
Merge branch 'en/strmap'
A specialization of hashmap that uses a string as key has been introduced. Hopefully it will see wider use over time. * 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 'ref-filter.c')
-rw-r--r--ref-filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ref-filter.c b/ref-filter.c
index 6476686..aa260bf 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -2230,7 +2230,7 @@ void ref_array_clear(struct ref_array *array)
used_atom_cnt = 0;
if (ref_to_worktree_map.worktrees) {
- hashmap_free_entries(&(ref_to_worktree_map.map),
+ hashmap_clear_and_free(&(ref_to_worktree_map.map),
struct ref_to_worktree_entry, ent);
free_worktrees(ref_to_worktree_map.worktrees);
ref_to_worktree_map.worktrees = NULL;