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

Re: git-gui: disable the "loose objects popup" dialog?

From
Pratyush Yadav <me@yadavpratyush.com>
Date
Oct 1, 2019, 18:00 UTC
Message-ID
<20191001180005.iemqmlbn7ncv3dav@yadavpratyush.com>
In-Reply-To
<9d77189d-a357-ab0a-6cb5-e87ecdeffb91@kdbg.org>
On 26/09/19 11:13PM, Johannes Sixt wrote:
Show 35 quoted lines
> Am 26.09.19 um 21:15 schrieb Pratyush Yadav:
> > Reading the Stackoverflow link, it seems this is already possible via an 
> > undocumented config variable "gui.gcwarning". I haven't tried using it 
> > though, but I see no reason for it to not work (looking at 
> > git-gui.sh:4141).
> 
> Ah! That explains why I don't see the message on one of my computers,
> but I do see on others. I must have reset gui.gcwarning there a decade
> ago, and forgot about it.
> 
> > Maybe we should add this variable in the options dialog, so people at 
> > least know it exists?
> 
> That may be the most reasonable thing to do, IMO.
> 
> >> What about a configurable limit, but still show the dialog?
> > 
> > Do people really care that much about configuring this limit to warrant 
> > something like this? 
> 
> Never mind. We don't need it if there is a simple switch.
> 
> > Talking about auto compression, would it be a better idea to let users 
> > disable the dialog, and then if they do want auto compression, they can 
> > just run a cron job (or the Windows equivalent) to do this on their 
> > repos? What reasons do people have to have this feature in git-gui, 
> > instead of running cron jobs?
> 
> This is a GUI. It was intended for people with a dislike of the command
> line. If you avoid the command line as much as possible, you never get
> to see any object statistics; yet, all operations would slow down
> gradually due to object bloat with no way out. Remember that this
> feature was invented long before auto-gc came to existence. Not to
> mention that git-gui uses plumbing mostly where auto-gc would not
> trigger anyway.

Marc's reply to this thread seems to suggest he has had a great experience with this feature disabled, because "the rest of git's auto-gc machinery is now working quite well (compared to when git-gui was first introduced)".

I personally am not very familiar with the details of Git's auto-gc, and Googling around didn't really give out any promising results.

What I gather from reading the man page is that "some commands" run git-gc automatically. There isn't much mention of which those commands are. But you say that plumbing does not trigger auto-gc, so it would not get triggered by people using git-gui.

So here's what I propose: why don't we try to do something similar? What about running `git-gc --auto` in the background when the user makes a commit (which I assume is the most common operation in git-gui). This would be disabled when the user sets gc.auto to 0.

This way, we keep a similar experience to the command line in case of auto-gc, and we get rid of the prompt. People who don't want auto-compression can just set gc.auto to 0, which they should do anyway.

Thoughts?
-- 
Regards,
Pratyush Yadav
Previous: Johannes SixtNext: Birger Skogeng Pedersen
Message 7 of 22 in “git-gui: disable the "loose objects popup" dialog?”
  1. Birger Skogeng PedersenSep 26, 2019
  2. Johannes SixtSep 26, 2019
  3. Birger Skogeng PedersenSep 26, 2019
  4. Pratyush YadavSep 26, 2019
  5. Birger Skogeng PedersenSep 26, 2019
  6. Johannes SixtSep 26, 2019
  7. Pratyush YadavOct 1, 2019
  8. Birger Skogeng PedersenOct 2, 2019
  9. Johannes SixtOct 2, 2019
  10. 0/4 run auto maintenance in git-guiWolfgang Faust, Mar 6, 2026
  11. 1/4 git-gui: run auto maintenance on commitWolfgang Faust, Mar 6, 2026
  12. 2/4 git-gui: remove hint_gc dialogWolfgang Faust, Mar 6, 2026
  13. 3/4 git-gui: remove "Compress Database" featureWolfgang Faust, Mar 6, 2026
  14. 4/4 scalar: remove obsolete gui.GCWarning settingWolfgang Faust, Mar 6, 2026
  15. Johannes SixtMar 7, 2026
  16. Junio C HamanoMar 7, 2026
  17. Johannes SixtMar 7, 2026
  18. Junio C HamanoMar 8, 2026
  19. Wolfgang FaustMar 11, 2026
  20. Johannes SixtMar 13, 2026
  21. Marc BranchaudOct 2, 2019
  22. Marc BranchaudSep 26, 2019

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.