[PATCH v4 05/13] pack-bitmap.c: teach `show_objects_for_type()` about incremental MIDXs
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 14, 2025, 20:18 UTC
- Message-ID
- <c7c9f8995628f0b1de6c802688be934319508103.1741983492.git.me@ttaylorr.com>
- In-Reply-To
- <cover.1741983492.git.me@ttaylorr.com>
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> --- pack-bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pack-bitmap.c b/pack-bitmap.c index 615d5de85e..1b4fec0033 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -1635,7 +1635,7 @@ static void show_objects_for_type( nth_midxed_object_oid(&oid, m, index_pos); pack_id = nth_midxed_pack_int_id(m, index_pos); - pack = bitmap_git->midx->packs[pack_id]; + pack = nth_midxed_pack(bitmap_git->midx, pack_id); } else { index_pos = pack_pos_to_index(bitmap_git->pack, pos + offset); ofs = pack_pos_to_offset(bitmap_git->pack, pos + offset);
-- 2.49.0.13.gd0d564685b