summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-11-21 15:14:38 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-21 15:14:38 -0800
commitbf0a430f70b53f94454692c9ae8ddadd18891aaa (patch)
tree0f55c315bc012df4f7fe235f1606b931625833d3 /diff.c
parentMerge branch 'jk/diff-release-filespec-fix' (diff)
parentshortlog: use strset from strmap.h (diff)
downloadtgif-bf0a430f70b53f94454692c9ae8ddadd18891aaa.tar.xz
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 'diff.c')
-rw-r--r--diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index ace4a1d387..643f4f3f6d 100644
--- a/diff.c
+++ b/diff.c
@@ -6315,9 +6315,9 @@ static void diff_flush_patch_all_file_pairs(struct diff_options *o)
if (o->color_moved == COLOR_MOVED_ZEBRA_DIM)
dim_moved_lines(o);
- hashmap_free_entries(&add_lines, struct moved_entry,
+ hashmap_clear_and_free(&add_lines, struct moved_entry,
ent);
- hashmap_free_entries(&del_lines, struct moved_entry,
+ hashmap_clear_and_free(&del_lines, struct moved_entry,
ent);
}