]> git.ipfire.org Git - thirdparty/git.git/commit
midx: enable reachability bitmaps during MIDX compaction
authorTaylor Blau <me@ttaylorr.com>
Tue, 24 Feb 2026 19:00:45 +0000 (14:00 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Feb 2026 19:16:35 +0000 (11:16 -0800)
commitd54da84bd9de09fc339accff553f1fc8a5539154
treedb24f30d2c4c9b0a2fffe29c1b9f63351795fc43
parent9df44a97f165bbdd8d591c6e99c8894ae036b5bd
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