]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rebuild_existing_bitmaps(): convert to new revindex API
authorTaylor Blau <me@ttaylorr.com>
Wed, 13 Jan 2021 22:24:27 +0000 (17:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jan 2021 05:53:46 +0000 (21:53 -0800)
Remove another instance of looking at the revindex directly by instead
calling 'pack_pos_to_index()'. Unlike other patches, this caller only
cares about the index position of each object in the loop.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-bitmap.c

index 1fdf7ce20a77ce57ec352e87f3002125bed976c3..60fe20fb87a42ea05e3cd16f07966bf30448ae3f 100644 (file)
@@ -1392,11 +1392,10 @@ uint32_t *create_bitmap_mapping(struct bitmap_index *bitmap_git,
 
        for (i = 0; i < num_objects; ++i) {
                struct object_id oid;
-               struct revindex_entry *entry;
                struct object_entry *oe;
 
-               entry = &bitmap_git->pack->revindex[i];
-               nth_packed_object_id(&oid, bitmap_git->pack, entry->nr);
+               nth_packed_object_id(&oid, bitmap_git->pack,
+                                    pack_pos_to_index(bitmap_git->pack, i));
                oe = packlist_find(mapping, &oid);
 
                if (oe)