]> git.ipfire.org Git - thirdparty/git.git/commit
pack-bitmap.c: teach `rev-list --test-bitmap` about incremental MIDXs
authorTaylor Blau <me@ttaylorr.com>
Thu, 20 Mar 2025 17:56:46 +0000 (13:56 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Mar 2025 11:33:53 +0000 (04:33 -0700)
commitfaab03f9a16cbca85415b73504eb95e6b8ed3d6b
tree03efd9ef09ac36aec73d0146c363c196d9198a3f
parent3886c7262170e2b7a2ed574ddefda2664695230a
pack-bitmap.c: teach `rev-list --test-bitmap` about incremental MIDXs

Implement support for the special `--test-bitmap` mode of `git rev-list`
when using incremental MIDXs.

The bitmap_test_data structure is extended to contain a "base" pointer
that mirrors the structure of the bitmap chain that it is being used to
test.

When we find a commit to test, we first chase down the ->base pointer to
find the appropriate bitmap_test_data for the bitmap layer that the
given commit is contained within, and then perform the test on that
bitmap.

In order to implement this, light modifications are made to
bitmap_for_commit() to reimplement it in terms of a new function,
find_bitmap_for_commit(), which fills out a pointer which indicates the
bitmap layer which contains the given commit.

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