Skip to content

Commit 07e3df9

Browse files
ttaylorrgitster
authored andcommitted
pack-bitmap.c: teach show_objects_for_type() about incremental MIDXs
Since we may ask for a pack_id that is in an earlier MIDX layer relative to the one corresponding to our bitmap, use nth_midxed_pack() instead of accessing the ->packs array directly. Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2da40a8 commit 07e3df9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pack-bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ static void show_objects_for_type(
16311631
nth_midxed_object_oid(&oid, m, index_pos);
16321632

16331633
pack_id = nth_midxed_pack_int_id(m, index_pos);
1634-
pack = bitmap_git->midx->packs[pack_id];
1634+
pack = nth_midxed_pack(bitmap_git->midx, pack_id);
16351635
} else {
16361636
index_pos = pack_pos_to_index(bitmap_git->pack, pos + offset);
16371637
ofs = pack_pos_to_offset(bitmap_git->pack, pos + offset);

0 commit comments

Comments
 (0)