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 <me@ttaylorr.com> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Taylor Blau committed Mar 20, 2025 at 13:56 UTC f77dbf028510100ae7334c3d0e8fbd80a725e303
1 file changed +1 -1
pack-bitmap.c
+1 -1
@@ -1636,7 +1636,7 @@ static void show_objects_for_type(
1636 nth_midxed_object_oid(&oid, m, index_pos);
1637
1638 pack_id = nth_midxed_pack_int_id(m, index_pos);
1639 - pack = bitmap_git->midx->packs[pack_id];
1639 + pack = nth_midxed_pack(bitmap_git->midx, pack_id);
1640 } else {
1641 index_pos = pack_pos_to_index(bitmap_git->pack, pos + offset);
1642 ofs = pack_pos_to_offset(bitmap_git->pack, pos + offset);