diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2019-02-19 03:04:58 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-01 05:57:37 +0300 |
commit | 3c7714485dc8adc810b6c52058992cfc767dfcb5 (patch) | |
tree | 9e8bb0e93cb9f17b208c58492438b155963b8024 /builtin | |
parent | 9941e920e0b5a79c5b7859cb59b9ab866a77b25f (diff) |
pack-bitmap: switch hash tables to use struct object_id
Instead of storing unsigned char pointers in the hash tables, switch to
storing instances of struct object_id. Update several internal functions
and one external function to take pointers to struct object_id.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/pack-objects.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index a154fc29f6..2d9a3bdc9d 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -1487,6 +1487,7 @@ static int can_reuse_delta(const unsigned char *base_sha1, struct object_entry **base_out) { struct object_entry *base; + struct object_id base_oid; if (!base_sha1) return 0; @@ -1508,10 +1509,9 @@ static int can_reuse_delta(const unsigned char *base_sha1, * even if it was buried too deep in history to make it into the * packing list. */ - if (thin && bitmap_has_sha1_in_uninteresting(bitmap_git, base_sha1)) { + oidread(&base_oid, base_sha1); + if (thin && bitmap_has_oid_in_uninteresting(bitmap_git, &base_oid)) { if (use_delta_islands) { - struct object_id base_oid; - hashcpy(base_oid.hash, base_sha1); if (!in_same_island(&delta->idx.oid, &base_oid)) return 0; } |