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

Re: [PATCH (resend)] git-gui: make gc warning threshold match 'git gc --auto'

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Jun 15, 2015, 16:41 UTC
Message-ID
<20150615164140.GA8990@book.hvoigt.net>
In-Reply-To
<557C90F9.8000200@gmail.com>
On Sat, Jun 13, 2015 at 10:22:17PM +0200, Karsten Blees wrote:
Show 24 quoted lines
> Date: Wed, 6 Aug 2014 20:43:46 +0200
> 
> The number of loose objects at which git-gui shows a gc warning has
> historically been hardcoded to ~2000, or ~200 on Windows. The warning can
> only be disabled completely via gui.gcwarning=false.
> 
> Especially on Windows, the hardcoded threshold is so ridiculously low that
> git-gui often complains even immediately after gc (due to loose objects
> only referenced by the reflog).
> 
> 'git gc --auto' uses a much bigger threshold to check if gc is necessary.
> Additionally, the value can be configured via gc.auto (default 6700).
> There's no special case for Windows.
> 
> Change git-gui so that it only warns if 'git gc --auto' would also do an
> automatic gc, i.e.:
>  - calculate the threshold from the gc.auto setting (default 6700,
>    disabled if <= 0)
>  - check directory .git/objects/17
> 
> We still check four directories (14-17) if gc.auto is very small, to get a
> better estimate.
> 
> Signed-off-by: Karsten Blees <blees@dcon.de>
Thanks, I like this!
Cheers Heiko
Previous: Karsten Blees
Message 2 of 2 in “git-gui: make gc warning threshold match 'git gc --auto'”
  1. git-gui: make gc warning threshold match 'git gc --auto'Karsten Blees, Jun 13, 2015
  2. Heiko VoigtJun 15, 2015

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.