]> Kevux Git Server - rit/commit
midx: teach `midx_contains_pack()` about incremental MIDXs
authorTaylor Blau <me@ttaylorr.com>
Tue, 6 Aug 2024 15:37:46 +0000 (11:37 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Aug 2024 19:01:37 +0000 (12:01 -0700)
commit853165c50a8c6df8424ee7a09d16272485ad1712
treeba2025b69fa06098cf337eb4f3d712f4ea023778
parent5d0ee3f6758cda141e9bc999b9aba0e53867538f
midx: teach `midx_contains_pack()` about incremental MIDXs

Now that the `midx_contains_pack()` versus `midx_locate_pack()` debacle
has been cleaned up, teach the former about how to operate in an
incremental MIDX-aware world in a similar fashion as in previous
commits.

Instead of using either of the two `midx_for_object()` or
`midx_for_pack()` helpers, this function is split into two: one that
determines whether a pack is contained in a single MIDX, and another
which calls the former in a loop over all MIDXs.

This approach does not require that we change any of the implementation
in what is now `midx_contains_pack_1()` as it still operates over a
single MIDX.

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