summaryrefslogtreecommitdiff
path: root/patch-ids.h
diff options
context:
space:
mode:
authorKevin Willford <kewillf@microsoft.com>2016-07-29 16:19:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-29 20:23:03 (GMT)
commitdfb7a1b4d0dafd53bf3980b3bd90668bf8d2a27f (patch)
treeb3b244552ee51397c7464ce0370c1f8d794ef911 /patch-ids.h
parent05219a1276341e72d8082d76b7f5ed394b7437a4 (diff)
downloadgit-dfb7a1b4d0dafd53bf3980b3bd90668bf8d2a27f.zip
git-dfb7a1b4d0dafd53bf3980b3bd90668bf8d2a27f.tar.gz
git-dfb7a1b4d0dafd53bf3980b3bd90668bf8d2a27f.tar.bz2
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 <kcwillford@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'patch-ids.h')
-rw-r--r--patch-ids.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/patch-ids.h b/patch-ids.h
index eeb56b3..9569ee0 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,