]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/repack.c: extract common cruft pack loop
authorTaylor Blau <me@ttaylorr.com>
Wed, 13 Sep 2023 19:18:03 +0000 (15:18 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Sep 2023 19:32:48 +0000 (12:32 -0700)
commitc6a0468f824f458acea442450d204a3d01d1aa9b
tree79274d863d8f8cd1a58fdc286dd4beae589cbc9c
parent4a17e97246470049b8bde5be0d767ef66e550555
builtin/repack.c: extract common cruft pack loop

When generating the list of packs to store in a MIDX (when given the
`--write-midx` option), we include any cruft packs both during
--geometric and non-geometric repacks.

But the rules for when we do and don't have to check whether any of
those cruft packs were queued for deletion differ slightly between the
two cases.

But the two can be unified, provided there is a little bit of extra
detail added in the comment to clarify when it is safe to avoid checking
for any pending deletions (and why it is OK to do so even when not
required).

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