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

[PATCH v2 0/2] gc: add --expire-to option

From
ZheNing Hu via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 31, 2024, 02:18 UTC
Message-ID
<pull.1843.v2.git.1735611513.gitgitgadget@gmail.com>
In-Reply-To
<pull.1843.git.1735041177817.gitgitgadget@gmail.com>

I want to perform a "safe" garbage collection for the Git repository on the server, which avoids data corruption issues caused by concurrent pushes during git GC. To achieve this, I currently need to use git repack --cruft --expire-to=<dir> and git prune in combination. However, it would be simpler if we could directly use --expire-to=<dir> with the git-gc command.

ZheNing Hu (2):
  gc: add `--expire-to` option
  fix(gc): make --prune=now compatible with --expire-to
 Documentation/git-gc.txt | 6 ++++++
 builtin/gc.c             | 9 +++++++--
 t/t6500-gc.sh            | 6 ++++++
 3 files changed, 19 insertions(+), 2 deletions(-)
base-commit: 92999a42db1c5f43f330e4f2bca4026b5b81576f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1843%2Fadlternative%2Fzh%2Fgc-expire-to-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1843/adlternative/zh/gc-expire-to-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1843
Range-diff vs v1:
 1:  14e94bf04e5 = 1:  14e94bf04e5 gc: add `--expire-to` option
 -:  ----------- > 2:  579757957d2 fix(gc): make --prune=now compatible with --expire-to
-- 
gitgitgadget
Previous: ZheNing Hu via GitGitGadgetNext: ZheNing Hu via GitGitGadget
Message 2 of 13 in “gc: add `--expire-to` option”
  1. gc: add `--expire-to` optionZheNing Hu via GitGitGadget, Dec 24, 2024
  2. 0/2 gc: add --expire-to optionZheNing Hu via GitGitGadget, Dec 31, 2024
  3. 1/2 gc: add `--expire-to` optionZheNing Hu via GitGitGadget, Dec 31, 2024
  4. ZheNing HuJan 3, 2025
  5. ZheNing HuJan 13, 2025
  6. 2/2 fix(gc): make --prune=now compatible with --expire-toZheNing Hu via GitGitGadget, Dec 31, 2024
  7. Jeff KingJan 13, 2025
  8. ZheNing HuJan 15, 2025
  9. gc: add `--expire-to` optionZheNing Hu via GitGitGadget, Jan 16, 2025
  10. Junio C HamanoJan 16, 2025
  11. ZheNing HuJan 23, 2025
  12. gc: add `--expire-to` optionZheNing Hu via GitGitGadget, Jan 24, 2025
  13. Junio C HamanoFeb 4, 2025

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.