pack-bitmap: convert struct stored_bitmap to object_id

Convert struct stored_bitmap to use struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Feb 19, 2019 at 00:04 UTC 53636539d37007099f14249a5dae4c05dc72ace4
1 file changed +4 -4
pack-bitmap.c
+4 -4
@@ -18,7 +18,7 @@
18 * commit.
19 */
20 struct stored_bitmap {
21 - unsigned char sha1[20];
21 + struct object_id oid;
22 struct ewah_bitmap *root;
23 struct stored_bitmap *xor;
24 int flags;
@@ -181,9 +181,9 @@ static struct stored_bitmap *store_bitmap(struct bitmap_index *index,
181 stored->root = root;
182 stored->xor = xor_with;
183 stored->flags = flags;
184 - hashcpy(stored->sha1, sha1);
184 + oidread(&stored->oid, sha1);
185
186 - hash_pos = kh_put_sha1(index->bitmaps, stored->sha1, &ret);
186 + hash_pos = kh_put_sha1(index->bitmaps, stored->oid.hash, &ret);
187
188 /* a 0 return code means the insertion succeeded with no changes,
189 * because the SHA1 already existed on the map. this is bad, there
@@ -1080,7 +1080,7 @@ int rebuild_existing_bitmaps(struct bitmap_index *bitmap_git,
1080 lookup_stored_bitmap(stored),
1081 rebuild)) {
1082 hash_pos = kh_put_sha1(reused_bitmaps,
1083 - stored->sha1,
1083 + stored->oid.hash,
1084 &hash_ret);
1085 kh_value(reused_bitmaps, hash_pos) =
1086 bitmap_to_ewah(rebuild);