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

Re: Question: How to execute git-gc correctly on the git server

From
Jeff King <peff@peff.net>
Date
Dec 8, 2022, 07:01 UTC
Message-ID
<Y5GLsZgmrxbBtLqo@coredump.intra.peff.net>
In-Reply-To
<20221208011631.GH28810@kitsune.suse.cz>
On Thu, Dec 08, 2022 at 02:16:31AM +0100, Michal Suchánek wrote:
Show 10 quoted lines
> > A "git gc" on a "live" repo is always racy in theory, but the odds that
> > you'll run into data corrupting trouble tends to approach zero as you
> > increase the gc.pruneExpire setting, with the default 2 weeks being more
> > than enough for even the most paranoid user.
> 
> And that two weeks expiration applies to what, exactly?
> 
> For commits there is author date and commit date but many other objecs
> won't have these I suppose. And the date when the object is pushed into
> the repository is unrelated to these two, anyway.

In this case it's the mtime on the object file (or the pack containing it). But yes, it is far from a complete race-free solution.

-Peff
Previous: Michal SuchánekNext: Michal Suchánek
Message 4 of 14 in “Question: How to execute git-gc correctly on the git server”
  1. ZheNing HuDec 7, 2022
  2. Ævar Arnfjörð BjarmasonDec 7, 2022
  3. Michal SuchánekDec 8, 2022
  4. Jeff KingDec 8, 2022
  5. Michal SuchánekDec 9, 2022
  6. Jeff KingDec 9, 2022
  7. ZheNing HuDec 9, 2022
  8. Ævar Arnfjörð BjarmasonDec 9, 2022
  9. ZheNing HuDec 11, 2022
  10. Michal SuchánekDec 11, 2022
  11. ZheNing HuDec 9, 2022
  12. Jeff KingDec 8, 2022
  13. Ævar Arnfjörð BjarmasonDec 8, 2022
  14. Taylor BlauDec 14, 2022

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.