]> git.ipfire.org Git - thirdparty/git.git/commit
midx: teach `bsearch_midx()` about incremental MIDXs
authorTaylor Blau <me@ttaylorr.com>
Tue, 6 Aug 2024 15:37:33 +0000 (11:37 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Aug 2024 19:01:37 +0000 (12:01 -0700)
commit88f309e095d084d730f908fe1ec01a92c63612c2
treeb6be73267d8cd8f31badda6c8df4b7de8a4c3328
parent3f5f1cff92dfe64bbbfa9f2fb4ed810125810b1b
midx: teach `bsearch_midx()` about incremental MIDXs

Now that the special cases callers of `bsearch_midx()` have been dealt
with, teach `bsearch_midx()` to handle incremental MIDX chains.

The incremental MIDX-aware version of `bsearch_midx()` works by
repeatedly searching for a given OID in each layer along the
`->base_midx` pointer, stopping either when an exact match is found, or
the end of the chain is reached.

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