(This is based on tb/multi-cruft-pack-refresh-fix from Junio's tree, which is at 08f612ba70 (builtin/pack-objects.c: freshen objects from existing cruft packs, 2025-03-13) at the time of writing). This series replaces something close to the existing behavior of repack's '--max-cruft-size' flag with '--combine-cruft-below-size'. The new flag is much clearer in its intent and function, and avoids the lack of clarity between the two that was discussed in <cover.1741648467.git.me@xxxxxxxxxxxx> The new behavior is as follows: - '--max-cruft-size' is a cruft pack-specific override for repack's '--max-pack-size' command-line flag. - '--combine-cruft-below-size' instructs repack to only combine cruft packs which are smaller than the given threshold. This will likely result in packs which are larger than the threshold. But that is OK: the point is to limit the size of the individual packs on input, not the size of the outgoing pack. This series does break the existing behavior of '--max-cruft-size'. But I think breaking backwards compatibility here is OK, since the existing behavior was so broken to begin with. I'm happy to consider other alternatives if others feel that this isn't OK. The series has an interesting structure that I feel may be worth calling out. The first three patches are trivial test cleanups. The fourth patch modifies the existing behavior of '--max-cruft-size', but does so while keeping some of the old infrastructure around. That may seem like an unnecessarily complicated approach, but it greatly simplifies introducing the new behavior in the following (and final) commit. I think that this results in a series that is a little easier to review (since we don't see a ton of code being removed in one commit and then re-added in another immediately following it). But if others feel like this was a mistake, please let me know ;-). Thanks in advance for your review! Taylor Blau (5): t/t5329-pack-objects-cruft.sh: evict 'repack'-related tests t/t7704-repack-cruft.sh: clarify wording in --max-cruft-size tests t/t7704-repack-cruft.sh: consolidate `write_blob()` repack: avoid combining cruft packs with `--max-cruft-size` repack: begin combining cruft packs with `--combine-cruft-below-size` Documentation/git-repack.adoc | 20 ++- builtin/repack.c | 62 +++---- t/t5329-pack-objects-cruft.sh | 302 ++++++---------------------------- t/t7704-repack-cruft.sh | 293 ++++++++++++++++++++++++++++++--- 4 files changed, 354 insertions(+), 323 deletions(-) base-commit: 08f612ba7000bf181ef6d8baed9ece322e567efd -- 2.49.0.rc0.6.g7f120c35e9