From dfb7a1b4d0dafd53bf3980b3bd90668bf8d2a27f Mon Sep 17 00:00:00 2001 From: Kevin Willford Date: Fri, 29 Jul 2016 12:19:17 -0400 Subject: patch-ids: stop using a hand-rolled hashmap implementation This change will use the hashmap from the hashmap.h to keep track of the patch_ids that have been encountered instead of using an internal implementation. This simplifies the implementation of the patch ids. Signed-off-by: Kevin Willford Signed-off-by: Junio C Hamano --- patch-ids.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'patch-ids.h') diff --git a/patch-ids.h b/patch-ids.h index eeb56b307f..9569ee0d26 100644 --- a/patch-ids.h +++ b/patch-ids.h @@ -2,15 +2,14 @@ #define PATCH_IDS_H struct patch_id { - unsigned char patch_id[20]; + struct hashmap_entry ent; + unsigned char patch_id[GIT_SHA1_RAWSZ]; char seen; }; struct patch_ids { + struct hashmap patches; struct diff_options diffopts; - int nr, alloc; - struct patch_id **table; - struct patch_id_bucket *patches; }; int commit_patch_id(struct commit *commit, struct diff_options *options, -- cgit v1.2.3