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

Re: gc.auto bug in 1.6.5.7

From
BCBrandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Date
Jan 6, 2010, 18:31 UTC
Message-ID
<u1EMnFha7hfr0SI0p8dEvAJML7vykSCAA6YzQd7klvze6oKChlMCLg@cipher.nrlssc.navy.mil>
In-Reply-To
<cccedfc61001060959h72a07eb6g78f2ca231867df63@mail.gmail.com>
Jon Nelson wrote:
Show 7 quoted lines
> It would appear that there is a bug in git, at least as of 1.6.5.7, in
> the gc command.
> When gc.auto is non-zero, it appears to consider packfiles as "loose"
> - this conflicts with pack.packSizeLimit, insofar as I have
> pack.packSizeLimit set to 2M (which appears to work).  If gc.auto is,
> say, 50 - once I exceed 50 2MB packs then gc --auto repacks *every
> single time* it is run. This is unexpected, at least.

There is also a gc.autopacklimit which controls auto-gc'ing based on the number of packs. The default is 50 and it does not consider the pack.packSizeLimit setting when deciding whether or not to auto-gc. It can be raised, or it can be disabled by setting it to zero.

The ideal number of packs is one, but if you limit the size of packs to be very small, then you will quickly grow the number of packs. Perhaps autogc should only count packs that are much smaller than pack.packSizeLimit? Looks like there is already a comment in builtin-gc.c suggesting something similar.

-brandon
Previous: Jon NelsonNext: Jon Nelson
Message 2 of 3 in “gc.auto bug in 1.6.5.7”
  1. Jon NelsonJan 6, 2010
  2. Brandon CaseyJan 6, 2010
  3. Jon NelsonJan 6, 2010

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.