Skip to content

repack: don't move existing packs out of the way

Taylor Blau git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3repack: make "exts" array available outside cmd_repack()builtin/repack.c+10 -90 replies
2/3builtin/repack.c: keep track of what pack-objects wrotebuiltin/repack.c+30 -10 replies
3/3builtin/repack.c: don't move existing packs out of the waybuiltin/repack.c+14 -897 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchJeff King
1/3
2/3Co-authored-by
3/3Helped-by Helped-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] repack: don't move existing packs out of the way

Hi,

Here are a few patches that GitHub has been running to get rid of the rename-to-old behavior that 'git repack' has when its invocation of 'pack-objects' produced a pack that already exists.

This was developed in the context of a circular dependency involving writing a multi-pack index during 'git repack' (we have some patches that do so by adding a '--write-midx' in the repack builtin), but it should be generally useful.

The idea (which is explained in detail in the final patch) is that prior to 1190a1acf8 (pack-objects: name pack files after trailer hash, 2013-12-05), 'git repack' had to move existing packs out of the way for safety, but after 1190a1acf8 no longer needs to do so.

This makes 'git repack' a little simpler since it no longer has to deal with any failures encountered during this rename-to-old behavior. It also paves the way for sending the MIDX-during-repack patches.

Thanks,
Taylor

Jeff King (1):
repack: make "exts" array available outside cmd_repack()

Taylor Blau (2):
builtin/repack.c: keep track of what pack-objects wrote builtin/repack.c: don't move existing packs out of the way

 builtin/repack.c | 153 +++++++++++++++++------------------------------
 1 file changed, 54 insertions(+), 99 deletions(-)

--
2.29.2.312.gabc4d358d8