summaryrefslogtreecommitdiff
path: root/t/unit-tests/t-hashmap.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-08-06 11:37:21 -0400
committerJunio C Hamano <gitster@pobox.com>2024-08-06 12:01:36 -0700
commit1820bd878c623a71ffc719ff09071fc6bbc6e34e (patch)
treebac3aa8800e40596182c58397ebe031fcc9aefb8 /t/unit-tests/t-hashmap.c
parent19419821bac508c5f40e1df45ca0b132b37d006b (diff)
midx: teach `prepare_midx_pack()` about incremental MIDXs
The function `prepare_midx_pack()` is part of the midx.h API and loads the pack identified by the MIDX-local 'pack_int_id'. This patch prepares that function to be aware of an incremental MIDX world. To do this, introduce the second of the two general purpose helpers mentioned in the previous commit. This commit introduces `midx_for_pack()`, which is the pack-specific analog of `midx_for_object()`, and works in the same fashion. Like `midx_for_object()`, this function chases down the '->base_midx' field until it finds the MIDX layer within the chain that contains the given pack. Use this function within `prepare_midx_pack()` so that the `pack_int_id` it expects is now relative to the entire MIDX chain, and that it prepares the given pack in the appropriate MIDX. 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