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

Re: git gc --auto yelling at users where a repo legitimately has >6700 loose objects

From
Jeff King <peff@peff.net>
Date
Jan 12, 2018, 13:46 UTC
Message-ID
<20180112134609.GB7880@sigill.intra.peff.net>
In-Reply-To
<87inc89j38.fsf@evledraar.gmail.com>
On Thu, Jan 11, 2018 at 10:33:15PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 8 quoted lines
>  4. At the end of all this, we check *again* if we have >6700 objects,
>     if we do we print "run 'git prune'" to .git/gc.log, and will just
>     emit that error for the next day before trying again, at which point
>     we unlink the gc.log and retry, see gc.logExpiry.
> 
> Right now I've just worked around this by setting gc.pruneExpire to a
> lower value (4.days.ago). But there's a larger issue to be addressed
> here, and I'm not sure how.

IMHO the right solution is to stop exploding loose objects, and instead write them all into a "cruft" pack. That's more efficient, to boot (since it doesn't waste inodes, and may even retain deltas between cruft objects).

But there are some tricks around timestamps. I wrote up some thoughts in:

  https://public-inbox.org/git/20170610080626.sjujpmgkli4muh7h@sigill.intra.peff.net/
and downthread from there.
-Peff
Previous: Jeff KingNext: Duy Nguyen
Message 6 of 9 in “git gc --auto yelling at users where a repo legitimately has >6700 loose objects”
  1. Ævar Arnfjörð BjarmasonJan 11, 2018
  2. Duy NguyenJan 12, 2018
  3. Duy NguyenJan 12, 2018
  4. Ævar Arnfjörð BjarmasonJan 12, 2018
  5. Jeff KingJan 13, 2018
  6. Jeff KingJan 12, 2018
  7. Duy NguyenJan 12, 2018
  8. Jeff KingJan 13, 2018
  9. Ævar Arnfjörð BjarmasonFeb 8, 2018

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.