]> git.ipfire.org Git - thirdparty/git.git/commit
pack-bitmap: tag bitmapped packs with their corresponding MIDX
authorTaylor Blau <me@ttaylorr.com>
Tue, 27 Aug 2024 21:13:30 +0000 (17:13 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Aug 2024 21:50:26 +0000 (14:50 -0700)
commit41cd4b478f7ee0a9049601afdcd7872bdbeae519
tree7e0e88b40197f8492ba6ed17f326110d9daf6da0
parentbbc393a9f3acc689f611fd602499064a2fe27d1a
pack-bitmap: tag bitmapped packs with their corresponding MIDX

The next commit will need to use the bitmap's MIDX (if one exists) to
translate bit positions into pack-relative positions in the source pack.

Ordinarily, we'd use the "midx" field of the bitmap_index struct. But
since that struct is defined within pack-bitmap.c, and our caller is in
a separate compilation unit, we do not have access to the MIDX field.

Instead, add a "from_midx" field to the bitmapped_pack structure so that
we can use that piece of data from outside of pack-bitmap.c. The caller
that uses this new piece of information will be added in the following
commit.

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