git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Taylor Blau <me@ttaylorr.com>
Date
Nov 16, 2020, 18:41 UTC
Message-ID
<cover.1605552016.git.me@ttaylorr.com>
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

Next: Taylor Blau
Message 1 of 11 in “repack: don't move existing packs out of the way”
  1. 0/3 repack: don't move existing packs out of the wayTaylor Blau, Nov 16, 2020
  2. 1/3 repack: make "exts" array available outside cmd_repack()Taylor Blau, Nov 16, 2020
  3. 2/3 builtin/repack.c: keep track of what pack-objects wroteTaylor Blau, Nov 16, 2020
  4. 3/3 builtin/repack.c: don't move existing packs out of the wayTaylor Blau, Nov 16, 2020
  5. Junio C HamanoNov 16, 2020
  6. Jeff KingNov 17, 2020
  7. Taylor BlauNov 17, 2020
  8. Taylor BlauNov 17, 2020
  9. Junio C HamanoNov 17, 2020
  10. Taylor BlauNov 17, 2020
  11. Junio C HamanoNov 17, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.