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

Re: [PATCH 0/4] run auto maintenance in git-gui

From
WFWolfgang Faust <contrib-git@wolfgangfaust.com>
Date
Mar 11, 2026, 04:48 UTC
Message-ID
<876fd32d-3965-4587-b567-399787741247@app.fastmail.com>
In-Reply-To
<40ccd060-e6f7-4130-a25e-3c2f65df8eb7@kdbg.org>
On Sat, Mar 7, 2026, at 2:37 PM, Johannes Sixt wrote:
Show 15 quoted lines
> Am 07.03.26 um 23:01 schrieb Junio C Hamano:
>> Johannes Sixt <j6t@kdbg.org> writes:
>>> So, users that are hurt by this new change are those where all these
>>> conditions are true:
>>> ...
>>> How many could this be? Not many, I guess. The conservative safe
>>> approach would be to treat gui.gcwarning=false as an indication that
>>> automatic cleanup is not desired.
>
> The option does not only control whether or not a warning appears, but
> also whether garbage collection happens or not. When it is set to false,
> then in addition to squelching the warning, garbage collection does
> *not* happen. The option is on by default, so if we find it off, the
> user must have set it explicitly, a clear sign (IMO) that Git GUI should
> not do the garbage collection.

I see your point about not garbage-collecting for people who haven't been expecting it, but on the other hand, checking `gui.gcwarning` would not help the people who were achieving the same result by clicking "No" every time.

However, it seems to me that the conditions you outlined are very unlikely. In particular:

> - They configure maintenance.* to do more cleanups than the default
> confituration (which is the same as `git gc --auto`, I think).
>
> - They never use `git maintenance run` through some other facility.

Are these not more or less mutually exclusive? Why would someone set up maintenance to do things, and then never run maintenance?

Given the above, I see two options:
1. Assume that in practice everybody wants auto maintenance and
   `gui.gcwarning` is set because they were annoyed by the dialog.
2. Assume that some people do *not* want auto maintenance, and if the
   `gui.gcmaintenance` option is unset then show some kind of dialog
   that tries to explain the situation to the user and encourages them
   to set `gui.gcmaintenance=auto`.

#2 is the safer option, but is rather complicated and involves bothering every user for the sake of strict compatibility. I assume that git core itself had to make a similar tradeoff when deciding to enable automatic garbage collection, but I don't know where I'd find that discussion and perhaps it's far enough in the past that the rationales are no longer relevant anyway.

Previous: Junio C HamanoNext: Johannes Sixt
Message 19 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.