summaryrefslogtreecommitdiff
path: root/t/unit-tests/t-hashmap.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-08-06 11:37:30 -0400
committerJunio C Hamano <gitster@pobox.com>2024-08-06 12:01:36 -0700
commit3f5f1cff92dfe64bbbfa9f2fb4ed810125810b1b (patch)
tree4bc0015be7250d54ab341a986dab37208e5cda25 /t/unit-tests/t-hashmap.c
parent60750e1eb967c8622e7140037ec018a87577132b (diff)
midx: introduce `bsearch_one_midx()`
The `bsearch_midx()` function will be extended in a following commit to search for the location of a given object ID across all MIDXs in a chain (or the single non-chain MIDX if no chain is available). While most callers will naturally want to use the updated `bsearch_midx()` function, there are a handful of special cases that will want finer control and will only want to search through a single MIDX. For instance, the object abbreviation code, which cares about object IDs near to where we'd expect to find a match in a MIDX. In that case, we want to look at the nearby matches in each layer of the MIDX chain, not just a single one). Split the more fine-grained control out into a separate function called `bsearch_one_midx()` which searches only a single MIDX. At present both `bsearch_midx()` and `bsearch_one_midx()` have identical behavior, but the following commit will rewrite the former to be aware of incremental MIDXs for the remaining non-special case callers. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-hashmap.c')
0 files changed, 0 insertions, 0 deletions