]> git.ipfire.org Git - thirdparty/git.git/commit
midx: enable reachability bitmaps during MIDX compaction
authorTaylor Blau <me@ttaylorr.com>
Wed, 14 Jan 2026 19:55:13 +0000 (14:55 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Jan 2026 20:53:00 +0000 (12:53 -0800)
commite701e85cafa61bf0422be45153498472f398f0ca
tree4a35d74e10df350f7601854b79a09a6d1f52becc
parent8d7e394ee96850623bc65d789c3619fbda8db9de
midx: enable reachability bitmaps during MIDX compaction

Enable callers to generate reachability bitmaps when performing MIDX
layer compaction by combining all existing bitmaps from the compacted
layers.

Note that because of the object/pack ordering described by the previous
commit, the pseudo-pack order for the compacted MIDX is the same as
concatenating the individual pseudo-pack orderings for each layer in the
compaction range.

As a result, the only non-test or documentation change necessary is to
treat all objects as non-preferred during compaction so as not to
disturb the object ordering.

In the future, we may want to adjust which commit(s) receive
reachability bitmaps when compacting multiple .bitmap files into one, or
even generate new bitmaps (e.g., if the references have moved
significantly since the .bitmap was generated). This commit only
implements combining all existing bitmaps in range together in order to
demonstrate and lay the groundwork for more exotic strategies.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-multi-pack-index.adoc
builtin/multi-pack-index.c
midx-write.c
t/t5335-compact-multi-pack-index.sh