]> git.ipfire.org Git - thirdparty/git.git/commit
pack-bitmap: enable reuse from all bitmapped packs
authorTaylor Blau <me@ttaylorr.com>
Thu, 14 Dec 2023 22:24:44 +0000 (17:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Dec 2023 22:38:09 +0000 (14:38 -0800)
commitaf626ac0e02570e3afac8b4238199157181d43c2
tree365cb75789b283a35754975929485a2be05dfb9f
parent941074134cefe49fd7dc894665f1eb9804e06cf8
pack-bitmap: enable reuse from all bitmapped packs

Now that both the pack-bitmap and pack-objects code are prepared to
handle marking and using objects from multiple bitmapped packs for
verbatim reuse, allow marking objects from all bitmapped packs as
eligible for reuse.

Within the `reuse_partial_packfile_from_bitmap()` function, we no longer
only mark the pack whose first object is at bit position zero for reuse,
and instead mark any pack contained in the MIDX as a reuse candidate.

Provide a handful of test cases in a new script (t5332) exercising
interesting behavior for multi-pack reuse to ensure that we performed
all of the previous steps correctly.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/pack.txt
builtin/pack-objects.c
pack-bitmap.c
pack-bitmap.h
t/t5332-multi-pack-reuse.sh [new file with mode: 0755]