]> git.ipfire.org Git - thirdparty/git.git/commit
pack-bitmap.c: open and store incremental bitmap layers
authorTaylor Blau <me@ttaylorr.com>
Thu, 20 Mar 2025 17:56:34 +0000 (13:56 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Mar 2025 11:33:36 +0000 (04:33 -0700)
commitf31a17cea5f6f66436e20f5dcefb6a0464238864
tree763c896354c0f7eeb51634208b37f709faaeaa03
parent8331c17b7961736ac69b74d26af579048ad77866
pack-bitmap.c: open and store incremental bitmap layers

Prepare the pack-bitmap machinery to work with incremental MIDXs by
adding a new "base" field to keep track of the bitmap index associated
with the previous MIDX layer.

The changes in this commit are mostly boilerplate to open the correct
bitmap(s), add them to the chain of bitmap layers along the "base"
pointer, ensure that the correct packs and their reverse indexes are
loaded across MIDX layers, etc.

While we're at it, keep track of a base_nr field to indicate how many
bitmap layers (including the current bitmap) exist. This will be used in
a future commit to allocate an array of 'struct ewah_bitmap' pointers to
collect all of the respective type bitmaps among all layers to
initialize a multi-EWAH iterator.

Subsequent commits will teach the functions within the pack-bitmap
machinery how to interact with these new fields.

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