public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* git-gui: disable the "loose objects popup" dialog?
@ 2019-09-26 17:31 Birger Skogeng Pedersen
  2019-09-26 18:54 ` Johannes Sixt
  0 siblings, 1 reply; 22+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-26 17:31 UTC (permalink / raw)
  To: Git List

Hi,


Every once in a while, I get the "This repository currently has
approximately (some number) loose objects." popup dialog.

I don't want to sound arrogant, but I find this popup along with the
dialog showing after that prints the result of the compression,
immensely annoying. And I've seen people mention before that they
would, in some casese, rather not have to deal with the dialog[0].

[0] https://stackoverflow.com/questions/1106529/how-to-skip-loose-object-popup-when-running-git-gui

I get that git-gui merely wants to resolve a performance issue. But
personally I'd prefer if git could just assume I always wanted to
compress the database, and automatically do it without bugging me with
the popups.

I propose we implement the following options in git-gui:
- ignore loose objects (do not show the popup), disabled by default.
- automatically, silently compress the database, without prompt. Also
disabled by default.


Thoughts?

Birger

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 17:31 git-gui: disable the "loose objects popup" dialog? Birger Skogeng Pedersen
@ 2019-09-26 18:54 ` Johannes Sixt
  2019-09-26 19:13   ` Birger Skogeng Pedersen
  2019-09-26 19:15   ` Pratyush Yadav
  0 siblings, 2 replies; 22+ messages in thread
From: Johannes Sixt @ 2019-09-26 18:54 UTC (permalink / raw)
  To: Birger Skogeng Pedersen; +Cc: Git List

Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:
> Every once in a while, I get the "This repository currently has
> approximately (some number) loose objects." popup dialog.
> 
> I don't want to sound arrogant, but I find this popup along with the
> dialog showing after that prints the result of the compression,
> immensely annoying. And I've seen people mention before that they
> would, in some casese, rather not have to deal with the dialog[0].
> 
> [0] https://stackoverflow.com/questions/1106529/how-to-skip-loose-object-popup-when-running-git-gui
> 
> I get that git-gui merely wants to resolve a performance issue. But
> personally I'd prefer if git could just assume I always wanted to
> compress the database, and automatically do it without bugging me with
> the popups.

I dislike the popup, too. But I want total control over my repository:
No automatic compression behind my back, in particular, when that
expires reflogs, and git-gui does that.

> I propose we implement the following options in git-gui:
> - ignore loose objects (do not show the popup), disabled by default.
> - automatically, silently compress the database, without prompt. Also
> disabled by default.

What about a configurable limit, but still show the dialog?

-- Hannes

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 18:54 ` Johannes Sixt
@ 2019-09-26 19:13   ` Birger Skogeng Pedersen
  2019-09-26 19:15   ` Pratyush Yadav
  1 sibling, 0 replies; 22+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-26 19:13 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git List

Hi Johannes,

On Thu, Sep 26, 2019 at 8:54 PM Johannes Sixt <j6t@kdbg.org> wrote:
> I dislike the popup, too. But I want total control over my repository:
> No automatic compression behind my back, in particular, when that
> expires reflogs, and git-gui does that.

I understand what you mean. In my opinion, An option to make git-gui
"ignore" loose objects (disable the automatic check) does not
challenge total control over the repository.

> What about a configurable limit, but still show the dialog?

Sorry, I don't follow. A limit to what?

I'm struggling to see the reasoning for the loose objects check (and
popup) to happen in git-gui the first place. Why does git-gui take it
upon itself to automatically perform this check? Is loose objects a
"gui" issue?

Birger

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 18:54 ` Johannes Sixt
  2019-09-26 19:13   ` Birger Skogeng Pedersen
@ 2019-09-26 19:15   ` Pratyush Yadav
  2019-09-26 21:12     ` Birger Skogeng Pedersen
                       ` (2 more replies)
  1 sibling, 3 replies; 22+ messages in thread
From: Pratyush Yadav @ 2019-09-26 19:15 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Birger Skogeng Pedersen, Git List

On 26/09/19 08:54PM, Johannes Sixt wrote:
> Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:
> > Every once in a while, I get the "This repository currently has
> > approximately (some number) loose objects." popup dialog.
> > 
> > I don't want to sound arrogant, but I find this popup along with the
> > dialog showing after that prints the result of the compression,
> > immensely annoying. And I've seen people mention before that they
> > would, in some casese, rather not have to deal with the dialog[0].
> > 
> > [0] https://stackoverflow.com/questions/1106529/how-to-skip-loose-object-popup-when-running-git-gui
> > 
> > I get that git-gui merely wants to resolve a performance issue. But
> > personally I'd prefer if git could just assume I always wanted to
> > compress the database, and automatically do it without bugging me with
> > the popups.
> 
> I dislike the popup, too. But I want total control over my repository:
> No automatic compression behind my back, in particular, when that
> expires reflogs, and git-gui does that.

I agree. Doing stuff like this in background by default is not the best 
idea IMHO. If the user asks explicitly, fine, but don't do it by 
default.
 
> > I propose we implement the following options in git-gui:
> > - ignore loose objects (do not show the popup), disabled by default.

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).

Maybe we should add this variable in the options dialog, so people at 
least know it exists?

> > - automatically, silently compress the database, without prompt. Also
> > disabled by default.
> 
> 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? 


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?

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 19:15   ` Pratyush Yadav
@ 2019-09-26 21:12     ` Birger Skogeng Pedersen
  2019-09-26 21:13     ` Johannes Sixt
  2019-09-26 21:14     ` Marc Branchaud
  2 siblings, 0 replies; 22+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-26 21:12 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Johannes Sixt, Git List

On Thu, Sep 26, 2019 at 9:15 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> 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?

Personally I would prefer that git-gui (silently) performs the check
and compression for me when I open it on a repo. But I can totally see
why some (propbably most) git users would not want that. So I don't
really mind if that part of my proposal gets denied.

> What reasons do people have to have this feature in git-gui,
> instead of running cron jobs?

I can't really think of a reason. But then again I can't really think
of a reason why users would want the "loose objects check" in git-gui
in the first place. Especially not enabled by default, popping up when
the user opens git-gui. A button (manual action) to perform this check
and (if necessary) perform the compression would be better IMO.

Birger

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 19:15   ` Pratyush Yadav
  2019-09-26 21:12     ` Birger Skogeng Pedersen
@ 2019-09-26 21:13     ` Johannes Sixt
  2019-10-01 18:00       ` Pratyush Yadav
  2019-09-26 21:14     ` Marc Branchaud
  2 siblings, 1 reply; 22+ messages in thread
From: Johannes Sixt @ 2019-09-26 21:13 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Birger Skogeng Pedersen, Git List

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.

-- Hannes

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 19:15   ` Pratyush Yadav
  2019-09-26 21:12     ` Birger Skogeng Pedersen
  2019-09-26 21:13     ` Johannes Sixt
@ 2019-09-26 21:14     ` Marc Branchaud
  2 siblings, 0 replies; 22+ messages in thread
From: Marc Branchaud @ 2019-09-26 21:14 UTC (permalink / raw)
  To: Pratyush Yadav, Johannes Sixt; +Cc: Birger Skogeng Pedersen, Git List

On 2019-09-26 3:15 p.m., Pratyush Yadav wrote:
> On 26/09/19 08:54PM, Johannes Sixt wrote:
>> Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:
>>> Every once in a while, I get the "This repository currently has
>>> approximately (some number) loose objects." popup dialog.
>>>
>>> I don't want to sound arrogant, but I find this popup along with the
>>> dialog showing after that prints the result of the compression,
>>> immensely annoying. And I've seen people mention before that they
>>> would, in some casese, rather not have to deal with the dialog[0].
>>>
>>> [0] https://stackoverflow.com/questions/1106529/how-to-skip-loose-object-popup-when-running-git-gui
>>>
>>> I get that git-gui merely wants to resolve a performance issue. But
>>> personally I'd prefer if git could just assume I always wanted to
>>> compress the database, and automatically do it without bugging me with
>>> the popups.
>>
>> I dislike the popup, too. But I want total control over my repository:
>> No automatic compression behind my back, in particular, when that
>> expires reflogs, and git-gui does that.
> 
> I agree. Doing stuff like this in background by default is not the best
> idea IMHO. If the user asks explicitly, fine, but don't do it by
> default.
>   
>>> I propose we implement the following options in git-gui:
>>> - ignore loose objects (do not show the popup), disabled by default.
> 
> 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).

I use this, and it works.  I haven't seen that dialog in years of 
near-daily repo usage.

> Maybe we should add this variable in the options dialog, so people at
> least know it exists?

My experience with qui.gcwarning (i.e. that git-gui hasn't compressed my 
repo in a very long time) suggests that we can just get rid of this part 
of git-gui.  I seem to recall that this was suggested the last time this 
was discussed, because the rest of git's auto-gc machinery is now 
working quite well (compared to when git-gui was first introduced).

		M.


>>> - automatically, silently compress the database, without prompt. Also
>>> disabled by default.
>>
>> 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?
> 
> 
> 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?
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 21:13     ` Johannes Sixt
@ 2019-10-01 18:00       ` Pratyush Yadav
  2019-10-02  7:12         ` Birger Skogeng Pedersen
                           ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Pratyush Yadav @ 2019-10-01 18:00 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Birger Skogeng Pedersen, Git List

On 26/09/19 11:13PM, Johannes Sixt wrote:
> 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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-10-01 18:00       ` Pratyush Yadav
@ 2019-10-02  7:12         ` Birger Skogeng Pedersen
  2019-10-02 18:48         ` Johannes Sixt
  2019-10-02 20:41         ` git-gui: disable the "loose objects popup" dialog? Marc Branchaud
  2 siblings, 0 replies; 22+ messages in thread
From: Birger Skogeng Pedersen @ 2019-10-02  7:12 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Johannes Sixt, Git List

On Tue, Oct 1, 2019 at 8:00 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> 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.

FWIW that proposal sounds pretty good to me.

Birger

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-10-01 18:00       ` Pratyush Yadav
  2019-10-02  7:12         ` Birger Skogeng Pedersen
@ 2019-10-02 18:48         ` Johannes Sixt
  2026-03-06  5:15           ` [PATCH 0/4] run auto maintenance in git-gui Wolfgang Faust
  2019-10-02 20:41         ` git-gui: disable the "loose objects popup" dialog? Marc Branchaud
  2 siblings, 1 reply; 22+ messages in thread
From: Johannes Sixt @ 2019-10-02 18:48 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Birger Skogeng Pedersen, Git List

Am 01.10.19 um 20:00 schrieb Pratyush Yadav:
> 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.

Sounds good.

-- Hannes

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-10-01 18:00       ` Pratyush Yadav
  2019-10-02  7:12         ` Birger Skogeng Pedersen
  2019-10-02 18:48         ` Johannes Sixt
@ 2019-10-02 20:41         ` Marc Branchaud
  2 siblings, 0 replies; 22+ messages in thread
From: Marc Branchaud @ 2019-10-02 20:41 UTC (permalink / raw)
  To: Pratyush Yadav, Johannes Sixt; +Cc: Birger Skogeng Pedersen, Git List

On 2019-10-01 2:00 p.m., Pratyush Yadav wrote:
> 
> 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?
> 

+1 from me.

		M.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 0/4] run auto maintenance in git-gui
  2019-10-02 18:48         ` Johannes Sixt
@ 2026-03-06  5:15           ` Wolfgang Faust
  2026-03-06  5:26             ` [PATCH 1/4] git-gui: run auto maintenance on commit Wolfgang Faust
                               ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Wolfgang Faust @ 2026-03-06  5:15 UTC (permalink / raw)
  To: git; +Cc: Johannes Sixt, Birger Skogeng Pedersen, Pratyush Yadav,
	Marc Branchaud

Resurrecting the 2019 conversation "git-gui: disable the "loose objects
popup" dialog?":
<https://lore.kernel.org/git/CAGr--=K15nUcnsJWOP87uMMjeQmTgAeO_6hnr12k2zuNQjNyBw@mail.gmail.com/t/#u>

The consensus there seems to be that git's auto maintenance is now
good enough and if git-gui implemented the same behavior as `git commit`
then the "repository currently has approximately %i loose objects"
dialog would no longer be necessary. This patch series implements that.

Wolfgang Faust (4):
  git-gui: run auto maintenance on commit
  git-gui: remove hint_gc dialog
  git-gui: remove "Compress Database" feature
  scalar: remove obsolete gui.GCWarning setting

 Documentation/config/gui.adoc |  5 -----
 Documentation/scalar.adoc     |  6 ------
 git-gui/git-gui.sh            |  6 ------
 git-gui/lib/commit.tcl        |  6 ++++++
 git-gui/lib/database.tcl      | 40 -----------------------------------
 git-gui/po/bg.po              | 22 -------------------
 git-gui/po/de.po              | 27 -----------------------
 git-gui/po/el.po              | 27 -----------------------
 git-gui/po/fr.po              | 28 ------------------------
 git-gui/po/hu.po              | 27 -----------------------
 git-gui/po/it.po              | 26 -----------------------
 git-gui/po/ja.po              | 26 -----------------------
 git-gui/po/nb.po              | 27 -----------------------
 git-gui/po/pt_br.po           | 27 -----------------------
 git-gui/po/pt_pt.po           | 27 -----------------------
 git-gui/po/ru.po              | 20 ------------------
 git-gui/po/sv.po              | 27 -----------------------
 git-gui/po/vi.po              | 27 -----------------------
 git-gui/po/zh_cn.po           | 26 -----------------------
 scalar.c                      |  1 -
 t/t9210-scalar.sh             | 20 +++++++++---------
 21 files changed, 16 insertions(+), 432 deletions(-)


base-commit: 7b2bccb0d58d4f24705bf985de1f4612e4cf06e5
-- 
2.52.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/4] git-gui: run auto maintenance on commit
  2026-03-06  5:15           ` [PATCH 0/4] run auto maintenance in git-gui Wolfgang Faust
@ 2026-03-06  5:26             ` Wolfgang Faust
  2026-03-06  5:30             ` [PATCH 2/4] git-gui: remove hint_gc dialog Wolfgang Faust
                               ` (3 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Faust @ 2026-03-06  5:26 UTC (permalink / raw)
  To: git; +Cc: Johannes Sixt

This implements the same behavior as seen in builtin/commit.c:
run auto maintenance between rerere and the post-commit hook.

Signed-off-by: Wolfgang Faust <contrib-git@wolfgangfaust.com>
---
(This email was previously accidentally sent with incorrect threading.
Please ignore the dup and bear with me as I figure out send-email...)

This always detaches rather than honoring autoDetach (unlike
run_auto_maintenance()) because I can't think of a circumstance where
you'd want the GUI to block.

 git-gui/lib/commit.tcl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl
index 89eb8c7b73..4b07cb3bbb 100644
--- a/git-gui/lib/commit.tcl
+++ b/git-gui/lib/commit.tcl
@@ -477,6 +477,12 @@ A rescan will be automatically started now.
 		catch {git rerere}
 	}
 
+	# -- Run auto maintenance (e.g. garbage collection)
+	#
+	if {[is_config_true maintenance.auto]} {
+		catch {exec git maintenance run --auto --quiet --detach}
+	}
+
 	# -- Run the post-commit hook.
 	#
 	set fd_ph [githook_read post-commit]
-- 
2.52.0

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/4] git-gui: remove hint_gc dialog
  2026-03-06  5:15           ` [PATCH 0/4] run auto maintenance in git-gui Wolfgang Faust
  2026-03-06  5:26             ` [PATCH 1/4] git-gui: run auto maintenance on commit Wolfgang Faust
@ 2026-03-06  5:30             ` Wolfgang Faust
  2026-03-06  5:32             ` [PATCH 3/4] git-gui: remove "Compress Database" feature Wolfgang Faust
                               ` (2 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Faust @ 2026-03-06  5:30 UTC (permalink / raw)
  To: git; +Cc: Johannes Sixt

Now that git-gui runs auto maintenance on commit, large piles of loose objects
are no longer a concern so we don't need to bother the user about them.

Signed-off-by: Wolfgang Faust <contrib-git@wolfgangfaust.com>
---
 Documentation/config/gui.adoc |  5 -----
 git-gui/git-gui.sh            |  3 ---
 git-gui/lib/database.tcl      | 26 --------------------------
 git-gui/po/bg.po              | 16 ----------------
 git-gui/po/de.po              | 17 -----------------
 git-gui/po/el.po              | 17 -----------------
 git-gui/po/fr.po              | 18 ------------------
 git-gui/po/hu.po              | 17 -----------------
 git-gui/po/it.po              | 16 ----------------
 git-gui/po/ja.po              | 16 ----------------
 git-gui/po/nb.po              | 17 -----------------
 git-gui/po/pt_br.po           | 17 -----------------
 git-gui/po/pt_pt.po           | 17 -----------------
 git-gui/po/ru.po              | 10 ----------
 git-gui/po/sv.po              | 17 -----------------
 git-gui/po/vi.po              | 17 -----------------
 git-gui/po/zh_cn.po           | 16 ----------------
 17 files changed, 262 deletions(-)

diff --git a/Documentation/config/gui.adoc b/Documentation/config/gui.adoc
index 1565c0af19..171be774d2 100644
--- a/Documentation/config/gui.adoc
+++ b/Documentation/config/gui.adoc
@@ -55,8 +55,3 @@ gui.blamehistoryctx::
 	linkgit:gitk[1] for the selected commit, when the `Show History
 	Context` menu item is invoked from 'git gui blame'. If this
 	variable is set to zero, the whole history is shown.
-
-gui.GCWarning::
-	Determines whether linkgit:git-gui[1] should prompt for garbage
-	collection when git detects a large number of loose objects in
-	the repository. The default value is "true".
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index d3d3aa14a9..29b708f9c8 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -3940,9 +3940,6 @@ after 1 {
 		$ui_comm configure -state disabled -background gray
 	}
 }
-if {[is_enabled multicommit] && ![is_config_false gui.gcwarning]} {
-	after 1000 hint_gc
-}
 if {[is_enabled retcode]} {
 	bind . <Destroy> {+terminate_me %W}
 }
diff --git a/git-gui/lib/database.tcl b/git-gui/lib/database.tcl
index 78732d8651..9b4cc98df5 100644
--- a/git-gui/lib/database.tcl
+++ b/git-gui/lib/database.tcl
@@ -86,29 +86,3 @@ proc do_fsck_objects {} {
 	lappend cmd --strict
 	console::exec $w $cmd
 }
-
-proc hint_gc {} {
-	set ndirs 1
-	set limit 8
-	if {[is_Windows]} {
-		set ndirs 4
-		set limit 1
-	}
-
-	set count [llength [glob \
-		-nocomplain \
-		-- \
-		[gitdir objects 4\[0-[expr {$ndirs-1}]\]/*]]]
-
-	if {$count >= $limit * $ndirs} {
-		set objects_current [expr {$count * 256/$ndirs}]
-		if {[ask_popup \
-			[mc "This repository currently has approximately %i loose objects.
-
-To maintain optimal performance it is strongly recommended that you compress the database.
-
-Compress the database now?" $objects_current]] eq yes} {
-			do_gc
-		}
-	}
-}
diff --git a/git-gui/po/bg.po b/git-gui/po/bg.po
index ff5adb25cc..2670bbb4ef 100644
--- a/git-gui/po/bg.po
+++ b/git-gui/po/bg.po
@@ -1167,22 +1167,6 @@ msgstr "Компресиране на базата с данни за обект
 msgid "Verifying the object database with fsck-objects"
 msgstr "Проверка на базата с данни за обектите с програмата „fsck-objects“"
 
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"В това хранилище в момента има към %i непакетирани обекти.\n"
-"\n"
-"За добра производителност се препоръчва да компресирате базата с данни за "
-"обектите.\n"
-"\n"
-"Да се започне ли компресирането?"
-
 #, tcl-format
 msgid "Invalid date from Git: %s"
 msgstr "Неправилни данни от Git: %s"
diff --git a/git-gui/po/de.po b/git-gui/po/de.po
index a8d5f61ca3..490ed25e0d 100644
--- a/git-gui/po/de.po
+++ b/git-gui/po/de.po
@@ -2682,23 +2682,6 @@ msgstr "Objektdatenbank komprimieren"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Die Objektdatenbank durch »fsck-objects« überprüfen lassen"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Dieses Repository enthält ungefähr %i nicht verknüpfte Objekte.\n"
-"\n"
-"Für eine optimale Performance wird empfohlen, die Datenbank des Repository "
-"zu komprimieren.\n"
-"\n"
-"Soll die Datenbank jetzt komprimiert werden?"
-
 #: lib/error.tcl:20
 #, tcl-format
 msgid "%s: error"
diff --git a/git-gui/po/el.po b/git-gui/po/el.po
index 3634ba469d..1c77b98b14 100644
--- a/git-gui/po/el.po
+++ b/git-gui/po/el.po
@@ -1410,23 +1410,6 @@ msgid "Verifying the object database with fsck-objects"
 msgstr ""
 "Γίνεται επαλήθευση της βάσης δεδομένων αντικειμένων με αντικείμενα fsck"
 
-#: lib/database.tcl:108
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database when more than %i loose objects exist.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Αυτό το αποθετήριο έχει αυτή τη στιγμή περίπου %i ελεύθερα αντικείμενα.\n"
-"\n"
-"Για τη διατήρηση βέλτιστων επιδόσεων συνιστάται να συμπιέσετε τη βάση "
-"δεδομένων όταν υπάρχουν περισσότερα από %i ελεύθερα αντικείμενα.\n"
-"\n"
-"Συμπίεση της βάσης δεδομένων τώρα;"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
diff --git a/git-gui/po/fr.po b/git-gui/po/fr.po
index 878df65399..9da3e09ba2 100644
--- a/git-gui/po/fr.po
+++ b/git-gui/po/fr.po
@@ -1556,24 +1556,6 @@ msgstr "Compression de la base des objets"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Vérification de la base des objets avec fsck-objects"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Ce dépôt comprend actuellement environ %i objets ayant leur fichier "
-"particulier.\n"
-"\n"
-"Pour conserver une performance optimale, il est fortement recommandé de "
-"comprimer la base de donnée.\n"
-"\n"
-"Comprimer la base maintenant ?"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
diff --git a/git-gui/po/hu.po b/git-gui/po/hu.po
index d106dadac8..4404af74d6 100644
--- a/git-gui/po/hu.po
+++ b/git-gui/po/hu.po
@@ -1505,23 +1505,6 @@ msgstr "Az objektum adatbázis tömörítése"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Az objektum adatbázis ellenőrzése az fsck-objects használatával"
 
-#: lib/database.tcl:108
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database when more than %i loose objects exist.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Ennek a repónak jelenleg %i különálló objektuma van.\n"
-"\n"
-"Az optimális teljesítményhez erősen ajánlott az adatbázis tömörítése, ha "
-"több mint %i objektum létezik.\n"
-"\n"
-"Lehet most tömöríteni az adatbázist?"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
diff --git a/git-gui/po/it.po b/git-gui/po/it.po
index 1bd8b8e04f..b590dfbbd0 100644
--- a/git-gui/po/it.po
+++ b/git-gui/po/it.po
@@ -1552,22 +1552,6 @@ msgstr "Compressione dell'archivio in corso"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Verifica dell'archivio con fsck-objects in corso"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Questo archivio attualmente ha circa %i oggetti slegati.\n"
-"\n"
-"Per mantenere buone prestazioni si raccomanda di comprimere l'archivio.\n"
-"\n"
-"Comprimere l'archivio ora?"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
diff --git a/git-gui/po/ja.po b/git-gui/po/ja.po
index 2f61153ab9..d52bcd7f8c 100644
--- a/git-gui/po/ja.po
+++ b/git-gui/po/ja.po
@@ -1939,22 +1939,6 @@ msgstr "データベース圧縮"
 msgid "Verifying the object database with fsck-objects"
 msgstr "fsck-objects でオブジェクト・データベースを検証しています"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"このリポジトリにはおおよそ %i 個の個別オブジェクトがあります\n"
-"\n"
-"最適な性能を保つために、データベースを圧縮することを推奨します\n"
-"\n"
-"データベースを圧縮しますか?"
-
 #: lib/transport.tcl:6 lib/remote_add.tcl:132
 #, tcl-format
 msgid "fetch %s"
diff --git a/git-gui/po/nb.po b/git-gui/po/nb.po
index d66aa50263..4b6e5136b0 100644
--- a/git-gui/po/nb.po
+++ b/git-gui/po/nb.po
@@ -1462,23 +1462,6 @@ msgstr "Komprimerer objektdatabasen"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Verifiserer objektdatabasen med fsck-objects"
 
-#: lib/database.tcl:108
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database when more than %i loose objects exist.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Dette arkivet inneholder omtrent %i 'løse' objekter.\n"
-"\n"
-"For å sikre en optimal ytelse er det sterkt anbefalt at du komprimerer "
-"databasen når det er flere enn %i 'løse' objekter i den.\n"
-"\n"
-"Komprimere databasen nå?"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
diff --git a/git-gui/po/pt_br.po b/git-gui/po/pt_br.po
index bad116c780..8580aaaece 100644
--- a/git-gui/po/pt_br.po
+++ b/git-gui/po/pt_br.po
@@ -1541,23 +1541,6 @@ msgstr "Compactando banco de dados de objetos"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Verificando banco de dados de objetos com fsck-objects"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Este repositório possui aproximadamente %i objetos soltos.\n"
-"\n"
-"Para manter o desempenho ótimo é altamente recomendado que você compacte o "
-"banco de dados.\n"
-"\n"
-"Compactar o banco de dados agora?"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
diff --git a/git-gui/po/pt_pt.po b/git-gui/po/pt_pt.po
index 0ef3c7927d..e6354ce5c0 100644
--- a/git-gui/po/pt_pt.po
+++ b/git-gui/po/pt_pt.po
@@ -2537,23 +2537,6 @@ msgstr "A comprimir a base de dados de objetos"
 msgid "Verifying the object database with fsck-objects"
 msgstr "A verificar a base de dados de objetos com fsck-objects"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Este repositório tem aproximadamente %i objetos soltos.\n"
-"\n"
-"Para manter o desempenho ótimo é veemente recomendado que comprima a base de "
-"dados.\n"
-"\n"
-"Comprimir a base de dados agora?"
-
 #: lib/error.tcl:20 lib/error.tcl:116
 msgid "error"
 msgstr "erro"
diff --git a/git-gui/po/ru.po b/git-gui/po/ru.po
index 7aebaf809d..4761cc1adb 100644
--- a/git-gui/po/ru.po
+++ b/git-gui/po/ru.po
@@ -2507,16 +2507,6 @@ msgstr "Сжатие базы объектов"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Проверка базы объектов при помощи fsck"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress the database.\n"
-"\n"
-"Compress the database now?"
-msgstr "Этот репозиторий сейчас содержит примерно %i свободных объектов\n\nДля лучшей производительности рекомендуется сжать базу данных.\n\nСжать базу данных сейчас?"
-
 #: lib/error.tcl:20
 #, tcl-format
 msgid "%s: error"
diff --git a/git-gui/po/sv.po b/git-gui/po/sv.po
index de65c18584..06835f133a 100644
--- a/git-gui/po/sv.po
+++ b/git-gui/po/sv.po
@@ -1612,23 +1612,6 @@ msgstr "Komprimerar objektdatabasen"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Verifierar objektdatabasen med fsck-objects"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Arkivet har för närvarande omkring %i lösa objekt.\n"
-"\n"
-"För att bibehålla optimal prestanda rekommenderas det å det bestämdaste att "
-"du komprimerar databasen.\n"
-"\n"
-"Komprimera databasen nu?"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
diff --git a/git-gui/po/vi.po b/git-gui/po/vi.po
index d956b59a9e..ad0ec7816c 100644
--- a/git-gui/po/vi.po
+++ b/git-gui/po/vi.po
@@ -1598,23 +1598,6 @@ msgstr "Nén cơ sở dữ liệu đối tượng"
 msgid "Verifying the object database with fsck-objects"
 msgstr "Đang kiểm tra cơ sở dữ liệu đối tượng bằng lệnh fsck"
 
-#: lib/database.tcl:107
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"Hiện kho này mất ước chừng khoảng %i đối tượng.\n"
-"\n"
-"Để tối ưu hóa hiệu suất, khuyến nghị bạn nên nén cơ sở dữ liệu của mình "
-"lại.\n"
-"\n"
-"Nén cơ sở dữ liệu chứ?"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
diff --git a/git-gui/po/zh_cn.po b/git-gui/po/zh_cn.po
index 91c1be23c2..4412d4ea44 100644
--- a/git-gui/po/zh_cn.po
+++ b/git-gui/po/zh_cn.po
@@ -1388,22 +1388,6 @@ msgstr "压缩对象数据库"
 msgid "Verifying the object database with fsck-objects"
 msgstr "使用 fsck-objects 验证对象数据库"
 
-#: lib/database.tcl:108
-#, tcl-format
-msgid ""
-"This repository currently has approximately %i loose objects.\n"
-"\n"
-"To maintain optimal performance it is strongly recommended that you compress "
-"the database when more than %i loose objects exist.\n"
-"\n"
-"Compress the database now?"
-msgstr ""
-"该版本库当前约有 %i 个松散对象.\n"
-"\n"
-"为达到较优的性能,强烈建议你在松散对象多于 %i 时压缩数据库.\n"
-"\n"
-"现在就压缩数据库么?"
-
 #: lib/date.tcl:25
 #, tcl-format
 msgid "Invalid date from Git: %s"
-- 
2.52.0

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/4] git-gui: remove "Compress Database" feature
  2026-03-06  5:15           ` [PATCH 0/4] run auto maintenance in git-gui Wolfgang Faust
  2026-03-06  5:26             ` [PATCH 1/4] git-gui: run auto maintenance on commit Wolfgang Faust
  2026-03-06  5:30             ` [PATCH 2/4] git-gui: remove hint_gc dialog Wolfgang Faust
@ 2026-03-06  5:32             ` Wolfgang Faust
  2026-03-06  5:32             ` [PATCH 4/4] scalar: remove obsolete gui.GCWarning setting Wolfgang Faust
  2026-03-07 11:32             ` [PATCH 0/4] run auto maintenance in git-gui Johannes Sixt
  4 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Faust @ 2026-03-06  5:32 UTC (permalink / raw)
  To: git; +Cc: Johannes Sixt

Now that git-gui runs auto maintenance on commit and we expect that users no
longer need to manually compress the database on a regular basis, this feature
is not necessary.

Signed-off-by: Wolfgang Faust <contrib-git@wolfgangfaust.com>
---
This patch is more to start discussion than something I think is necessarily a
good idea: maybe there are other circumstances where this is still useful?

 git-gui/git-gui.sh       |  3 ---
 git-gui/lib/database.tcl | 14 --------------
 git-gui/po/bg.po         |  6 ------
 git-gui/po/de.po         | 10 ----------
 git-gui/po/el.po         | 10 ----------
 git-gui/po/fr.po         | 10 ----------
 git-gui/po/hu.po         | 10 ----------
 git-gui/po/it.po         | 10 ----------
 git-gui/po/ja.po         | 10 ----------
 git-gui/po/nb.po         | 10 ----------
 git-gui/po/pt_br.po      | 10 ----------
 git-gui/po/pt_pt.po      | 10 ----------
 git-gui/po/ru.po         | 10 ----------
 git-gui/po/sv.po         | 10 ----------
 git-gui/po/vi.po         | 10 ----------
 git-gui/po/zh_cn.po      | 10 ----------
 16 files changed, 153 deletions(-)

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 29b708f9c8..d2f3ff3e96 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -2652,9 +2652,6 @@ if {[is_enabled multicommit]} {
 	.mbar.repository add command -label [mc "Database Statistics"] \
 		-command do_stats
 
-	.mbar.repository add command -label [mc "Compress Database"] \
-		-command do_gc
-
 	.mbar.repository add command -label [mc "Verify Database"] \
 		-command do_fsck_objects
 
diff --git a/git-gui/lib/database.tcl b/git-gui/lib/database.tcl
index 9b4cc98df5..7edb45b5c8 100644
--- a/git-gui/lib/database.tcl
+++ b/git-gui/lib/database.tcl
@@ -29,11 +29,7 @@ proc do_stats {} {
 	ttk::button $w.buttons.close -text [mc Close] \
 		-default active \
 		-command [list destroy $w]
-	ttk::button $w.buttons.gc -text [mc "Compress Database"] \
-		-default normal \
-		-command "destroy $w;do_gc"
 	pack $w.buttons.close -side right
-	pack $w.buttons.gc -side left
 	pack $w.buttons -side bottom -fill x -pady 10 -padx 10
 
 	ttk::labelframe $w.stat -text [mc "Database Statistics"]
@@ -67,16 +63,6 @@ proc do_stats {} {
 	tkwait window $w
 }
 
-proc do_gc {} {
-	set w [console::new {gc} [mc "Compressing the object database"]]
-	console::chain $w {
-		{exec git pack-refs --prune}
-		{exec git reflog expire --all}
-		{exec git repack -a -d -l}
-		{exec git rerere gc}
-	}
-}
-
 proc do_fsck_objects {} {
 	set w [console::new {fsck-objects} \
 		[mc "Verifying the object database with fsck-objects"]]
diff --git a/git-gui/po/bg.po b/git-gui/po/bg.po
index 2670bbb4ef..c7f3e57a58 100644
--- a/git-gui/po/bg.po
+++ b/git-gui/po/bg.po
@@ -184,9 +184,6 @@ msgstr "Визуализация на историята на „%s“"
 msgid "Database Statistics"
 msgstr "Статистика на базата от данни"
 
-msgid "Compress Database"
-msgstr "Компресиране на базата от данни"
-
 msgid "Verify Database"
 msgstr "Проверка на базата от данни"
 
@@ -1161,9 +1158,6 @@ msgstr "%s:"
 msgid "%s (%s): Database Statistics"
 msgstr "%s (%s): Статистика на базата от данни"
 
-msgid "Compressing the object database"
-msgstr "Компресиране на базата с данни за обектите"
-
 msgid "Verifying the object database with fsck-objects"
 msgstr "Проверка на базата с данни за обектите с програмата „fsck-objects“"
 
diff --git a/git-gui/po/de.po b/git-gui/po/de.po
index 490ed25e0d..c9d197335e 100644
--- a/git-gui/po/de.po
+++ b/git-gui/po/de.po
@@ -246,11 +246,6 @@ msgstr "Historie von »%s« darstellen"
 #: git-gui.sh:2799 lib/database.tcl:40
 msgid "Database Statistics"
 msgstr "Datenbankstatistik"
-
-#: git-gui.sh:2802 lib/database.tcl:33
-msgid "Compress Database"
-msgstr "Datenbank komprimieren"
-
 #: git-gui.sh:2805
 msgid "Verify Database"
 msgstr "Datenbank überprüfen"
@@ -2673,11 +2668,6 @@ msgstr "Dateien im Mülleimer"
 #, tcl-format
 msgid "%s (%s): Database Statistics"
 msgstr "%s (%s): Datenbankstatistik"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Objektdatenbank komprimieren"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Die Objektdatenbank durch »fsck-objects« überprüfen lassen"
diff --git a/git-gui/po/el.po b/git-gui/po/el.po
index 1c77b98b14..5f780f4c5b 100644
--- a/git-gui/po/el.po
+++ b/git-gui/po/el.po
@@ -197,11 +197,6 @@ msgstr "Απεικόνιση Ιστορικού του %s"
 #: git-gui.sh:1906 lib/database.tcl:27 lib/database.tcl:67
 msgid "Database Statistics"
 msgstr "Στατιστικά Βάσης Δεδομένων"
-
-#: git-gui.sh:1909 lib/database.tcl:34
-msgid "Compress Database"
-msgstr "Συμπίεση Βάσης Δεδομένων"
-
 #: git-gui.sh:1912
 msgid "Verify Database"
 msgstr "Επαλήθευση Βάσης Δεδομένων"
@@ -1400,11 +1395,6 @@ msgstr "Πακεταρισμένα αντικείμενα έτοιμα για κ
 #: lib/database.tcl:49
 msgid "Garbage files"
 msgstr "Άχρηστα αρχεία"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Γίνεται συμπίεση της βάσης δεδομένων αντικειμένων"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr ""
diff --git a/git-gui/po/fr.po b/git-gui/po/fr.po
index 9da3e09ba2..d0354ed8ff 100644
--- a/git-gui/po/fr.po
+++ b/git-gui/po/fr.po
@@ -227,11 +227,6 @@ msgstr "Voir l'historique de la branche : %s"
 #: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
 msgid "Database Statistics"
 msgstr "Statistiques du dépôt"
-
-#: git-gui.sh:2513 lib/database.tcl:34
-msgid "Compress Database"
-msgstr "Comprimer le dépôt"
-
 #: git-gui.sh:2516
 msgid "Verify Database"
 msgstr "Vérifier le dépôt"
@@ -1547,11 +1542,6 @@ msgstr "Objets empaquetés attendant d'être supprimés"
 #: lib/database.tcl:49
 msgid "Garbage files"
 msgstr "Fichiers poubelle"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Compression de la base des objets"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Vérification de la base des objets avec fsck-objects"
diff --git a/git-gui/po/hu.po b/git-gui/po/hu.po
index 4404af74d6..8141ab13f3 100644
--- a/git-gui/po/hu.po
+++ b/git-gui/po/hu.po
@@ -215,11 +215,6 @@ msgstr "A(z) %s branch történetének vizualizálása"
 #: git-gui.sh:2334 lib/database.tcl:27 lib/database.tcl:67
 msgid "Database Statistics"
 msgstr "Adatbázis statisztikák"
-
-#: git-gui.sh:2337 lib/database.tcl:34
-msgid "Compress Database"
-msgstr "Adatbázis tömörítése"
-
 #: git-gui.sh:2340
 msgid "Verify Database"
 msgstr "Adatbázis ellenőrzése"
@@ -1496,11 +1491,6 @@ msgstr "Eltávolításra váró csomagolt objektumok számra"
 #: lib/database.tcl:49
 msgid "Garbage files"
 msgstr "Hulladék fájlok"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Az objektum adatbázis tömörítése"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Az objektum adatbázis ellenőrzése az fsck-objects használatával"
diff --git a/git-gui/po/it.po b/git-gui/po/it.po
index b590dfbbd0..6e9b8d97b7 100644
--- a/git-gui/po/it.po
+++ b/git-gui/po/it.po
@@ -225,11 +225,6 @@ msgstr "Visualizza la cronologia di %s"
 #: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
 msgid "Database Statistics"
 msgstr "Statistiche dell'archivio"
-
-#: git-gui.sh:2513 lib/database.tcl:34
-msgid "Compress Database"
-msgstr "Comprimi l'archivio"
-
 #: git-gui.sh:2516
 msgid "Verify Database"
 msgstr "Verifica l'archivio"
@@ -1543,11 +1538,6 @@ msgstr "Oggetti impacchettati che attendono la potatura"
 #: lib/database.tcl:49
 msgid "Garbage files"
 msgstr "File inutili"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Compressione dell'archivio in corso"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Verifica dell'archivio con fsck-objects in corso"
diff --git a/git-gui/po/ja.po b/git-gui/po/ja.po
index d52bcd7f8c..31b59c8e58 100644
--- a/git-gui/po/ja.po
+++ b/git-gui/po/ja.po
@@ -246,11 +246,6 @@ msgstr "ブランチ %s の履歴を見る"
 #: git-gui.sh:2719 lib/database.tcl:40 lib/database.tcl:66
 msgid "Database Statistics"
 msgstr "データベース統計"
-
-#: git-gui.sh:2722 lib/database.tcl:33
-msgid "Compress Database"
-msgstr "データベース圧縮"
-
 #: git-gui.sh:2725
 msgid "Verify Database"
 msgstr "データベース検証"
@@ -1930,11 +1925,6 @@ msgstr "パックに存在するので捨てて良いオブジェクトの数"
 #: lib/database.tcl:48
 msgid "Garbage files"
 msgstr "ゴミファイル"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "データベース圧縮"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "fsck-objects でオブジェクト・データベースを検証しています"
diff --git a/git-gui/po/nb.po b/git-gui/po/nb.po
index 4b6e5136b0..41b8eb9b51 100644
--- a/git-gui/po/nb.po
+++ b/git-gui/po/nb.po
@@ -215,11 +215,6 @@ msgstr "Visualiser historien til %s"
 #: git-gui.sh:2334 lib/database.tcl:27 lib/database.tcl:67
 msgid "Database Statistics"
 msgstr "Databasestatistikk"
-
-#: git-gui.sh:2337 lib/database.tcl:34
-msgid "Compress Database"
-msgstr "Kompress databasen"
-
 #: git-gui.sh:2340
 msgid "Verify Database"
 msgstr "Verifiser databasen"
@@ -1453,11 +1448,6 @@ msgstr "Pakkede objekter som avventer fjerning"
 #: lib/database.tcl:49
 msgid "Garbage files"
 msgstr "Avfallsfiler"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Komprimerer objektdatabasen"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Verifiserer objektdatabasen med fsck-objects"
diff --git a/git-gui/po/pt_br.po b/git-gui/po/pt_br.po
index 8580aaaece..327708b511 100644
--- a/git-gui/po/pt_br.po
+++ b/git-gui/po/pt_br.po
@@ -223,11 +223,6 @@ msgstr "Visualizar histórico de %s"
 #: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
 msgid "Database Statistics"
 msgstr "Estatísticas do banco de dados"
-
-#: git-gui.sh:2513 lib/database.tcl:34
-msgid "Compress Database"
-msgstr "Compactar banco de dados"
-
 #: git-gui.sh:2516
 msgid "Verify Database"
 msgstr "Verificar banco de dados"
@@ -1532,11 +1527,6 @@ msgstr "Objetos compactados aguardando eliminação"
 #: lib/database.tcl:49
 msgid "Garbage files"
 msgstr "Arquivos de lixo"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Compactando banco de dados de objetos"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Verificando banco de dados de objetos com fsck-objects"
diff --git a/git-gui/po/pt_pt.po b/git-gui/po/pt_pt.po
index e6354ce5c0..498700c91f 100644
--- a/git-gui/po/pt_pt.po
+++ b/git-gui/po/pt_pt.po
@@ -247,11 +247,6 @@ msgstr "Visualizar histórico de %s"
 #: git-gui.sh:2719 lib/database.tcl:40 lib/database.tcl:66
 msgid "Database Statistics"
 msgstr "Estatísticas da base de dados"
-
-#: git-gui.sh:2722 lib/database.tcl:33
-msgid "Compress Database"
-msgstr "Comprimir base de dados"
-
 #: git-gui.sh:2725
 msgid "Verify Database"
 msgstr "Verificar base de dados"
@@ -2528,11 +2523,6 @@ msgstr "Objetos compactados à espera de poda"
 #: lib/database.tcl:48
 msgid "Garbage files"
 msgstr "Ficheiros de lixo"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "A comprimir a base de dados de objetos"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "A verificar a base de dados de objetos com fsck-objects"
diff --git a/git-gui/po/ru.po b/git-gui/po/ru.po
index 4761cc1adb..8151f02d8a 100644
--- a/git-gui/po/ru.po
+++ b/git-gui/po/ru.po
@@ -238,11 +238,6 @@ msgstr "Показать историю ветки %s"
 #: git-gui.sh:2799 lib/database.tcl:40
 msgid "Database Statistics"
 msgstr "Статистика базы данных"
-
-#: git-gui.sh:2802 lib/database.tcl:33
-msgid "Compress Database"
-msgstr "Сжать базу данных"
-
 #: git-gui.sh:2805
 msgid "Verify Database"
 msgstr "Проверить базу данных"
@@ -2498,11 +2493,6 @@ msgstr "Мусор"
 #, tcl-format
 msgid "%s (%s): Database Statistics"
 msgstr "%s (%s): Статистика базы данных"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Сжатие базы объектов"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Проверка базы объектов при помощи fsck"
diff --git a/git-gui/po/sv.po b/git-gui/po/sv.po
index 06835f133a..9509fcda0a 100644
--- a/git-gui/po/sv.po
+++ b/git-gui/po/sv.po
@@ -252,11 +252,6 @@ msgstr "Visualisera historik för %s"
 #: git-gui.sh:2824 lib/database.tcl:40
 msgid "Database Statistics"
 msgstr "Databasstatistik"
-
-#: git-gui.sh:2827 lib/database.tcl:33
-msgid "Compress Database"
-msgstr "Komprimera databas"
-
 #: git-gui.sh:2830
 msgid "Verify Database"
 msgstr "Verifiera databas"
@@ -1603,11 +1598,6 @@ msgstr "%s:"
 #, tcl-format
 msgid "%s (%s): Database Statistics"
 msgstr "%s (%s): Databasstatistik"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Komprimerar objektdatabasen"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Verifierar objektdatabasen med fsck-objects"
diff --git a/git-gui/po/vi.po b/git-gui/po/vi.po
index ad0ec7816c..67b9ee534f 100644
--- a/git-gui/po/vi.po
+++ b/git-gui/po/vi.po
@@ -248,11 +248,6 @@ msgstr "Duyệt lịch sử của %s trực quan"
 #: git-gui.sh:2713 lib/database.tcl:40 lib/database.tcl:66
 msgid "Database Statistics"
 msgstr "Thống kê cơ sở dữ liệu"
-
-#: git-gui.sh:2716 lib/database.tcl:33
-msgid "Compress Database"
-msgstr "Nén cơ sở dữ liệu"
-
 #: git-gui.sh:2719
 msgid "Verify Database"
 msgstr "Thẩm tra cơ sở dữ liệu"
@@ -1589,11 +1584,6 @@ msgstr "Các đối tượng gói chờ xén bớt"
 #: lib/database.tcl:48
 msgid "Garbage files"
 msgstr "Các tập tin rác"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "Nén cơ sở dữ liệu đối tượng"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "Đang kiểm tra cơ sở dữ liệu đối tượng bằng lệnh fsck"
diff --git a/git-gui/po/zh_cn.po b/git-gui/po/zh_cn.po
index 4412d4ea44..f7d290af7d 100644
--- a/git-gui/po/zh_cn.po
+++ b/git-gui/po/zh_cn.po
@@ -214,11 +214,6 @@ msgstr "图示 %s 分支的历史"
 #: git-gui.sh:1906 lib/database.tcl:27 lib/database.tcl:67
 msgid "Database Statistics"
 msgstr "数据库统计信息"
-
-#: git-gui.sh:1909 lib/database.tcl:34
-msgid "Compress Database"
-msgstr "压缩数据库"
-
 #: git-gui.sh:1912
 msgid "Verify Database"
 msgstr "验证数据库"
@@ -1379,11 +1374,6 @@ msgstr "压缩对象等待清理"
 #: lib/database.tcl:49
 msgid "Garbage files"
 msgstr "垃圾文件"
-
-#: lib/database.tcl:72
-msgid "Compressing the object database"
-msgstr "压缩对象数据库"
-
 #: lib/database.tcl:83
 msgid "Verifying the object database with fsck-objects"
 msgstr "使用 fsck-objects 验证对象数据库"
-- 
2.52.0

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 4/4] scalar: remove obsolete gui.GCWarning setting
  2026-03-06  5:15           ` [PATCH 0/4] run auto maintenance in git-gui Wolfgang Faust
                               ` (2 preceding siblings ...)
  2026-03-06  5:32             ` [PATCH 3/4] git-gui: remove "Compress Database" feature Wolfgang Faust
@ 2026-03-06  5:32             ` Wolfgang Faust
  2026-03-07 11:32             ` [PATCH 0/4] run auto maintenance in git-gui Johannes Sixt
  4 siblings, 0 replies; 22+ messages in thread
From: Wolfgang Faust @ 2026-03-06  5:32 UTC (permalink / raw)
  To: git; +Cc: Johannes Sixt

The git-gui tool now uses automatic maintenance and no longer uses this
config to prompt the user for manual garbage collection, so scalar no
longer needs to maintain this value.

The tests appear to have selected this setting as a sentinel, so change
them to use the similar gc.auto setting instead.

Signed-off-by: Wolfgang Faust <contrib-git@wolfgangfaust.com>
---
I assume this one needs to be CC'ed to the scalar maintainers, but I'll
do that once the rest of the series settles.

 Documentation/scalar.adoc |  6 ------
 scalar.c                  |  1 -
 t/t9210-scalar.sh         | 20 ++++++++++----------
 3 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/Documentation/scalar.adoc b/Documentation/scalar.adoc
index 5252fb134a..4dbe976b65 100644
--- a/Documentation/scalar.adoc
+++ b/Documentation/scalar.adoc
@@ -285,12 +285,6 @@ gc.auto=0::
 	This disables automatic garbage collection, since Scalar uses background
 	maintenance to keep the repository data in good shape.
 
-gui.GCWarning=false::
-	Since Scalar disables garbage collection by setting `gc.auto=0`, the
-	`git-gui` tool may start to warn about this setting. Disable this
-	warning as Scalar's background maintenance configuration makes the
-	warning irrelevant.
-
 index.skipHash=true::
 	Disable computing the hash of the index contents as it is being written.
 	This assists with performance, especially for large index files.
diff --git a/scalar.c b/scalar.c
index 4efb6ac36d..0a6359ec6d 100644
--- a/scalar.c
+++ b/scalar.c
@@ -150,7 +150,6 @@ static int set_recommended_config(int reconfigure)
 		{ "fetch.unpackLimit", "1" },
 		{ "fetch.writeCommitGraph", "false" },
 		{ "gc.auto", "0" },
-		{ "gui.GCWarning", "false" },
 		{ "index.skipHash", "true", 1 /* Fix previous setting. */ },
 		{ "index.threads", "true"},
 		{ "index.version", "4" },
diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh
index 009437a5f3..55f73939bb 100755
--- a/t/t9210-scalar.sh
+++ b/t/t9210-scalar.sh
@@ -202,15 +202,15 @@ test_expect_success 'scalar clone --no-... opts' '
 test_expect_success 'scalar reconfigure' '
 	git init one/src &&
 	scalar register one &&
-	git -C one/src config unset gui.gcwarning &&
+	git -C one/src config unset gc.auto &&
 	scalar reconfigure one &&
-	test false = "$(git -C one/src config gui.gcwarning)" &&
-	git -C one/src config unset gui.gcwarning &&
+	test 0 = "$(git -C one/src config gc.auto)" &&
+	git -C one/src config unset gc.auto &&
 	rm one/src/cron.txt &&
 	GIT_TRACE2_EVENT="$(pwd)/reconfigure" scalar reconfigure -a &&
 	test_path_is_file one/src/cron.txt &&
-	test false = "$(git -C one/src config gui.gcwarning)" &&
-	test_grep "GCWarning = false # set by scalar" one/src/.git/config &&
+	test 0 = "$(git -C one/src config gc.auto)" &&
+	test_grep "auto = 0 # set by scalar" one/src/.git/config &&
 	test_grep "excludeDecoration = refs/prefetch/\* # set by scalar" one/src/.git/config &&
 
 	test_subcommand git maintenance start <reconfigure &&
@@ -234,14 +234,14 @@ test_expect_success 'scalar reconfigure --all with includeIf.onbranch' '
 		git init $num/src &&
 		scalar register $num/src &&
 		git -C $num/src config includeif."onbranch:foo".path something &&
-		git -C $num/src config unset gui.gcwarning || return 1
+		git -C $num/src config unset gc.auto || return 1
 	done &&
 
 	scalar reconfigure --all &&
 
 	for num in $repos
 	do
-		test false = "$(git -C $num/src config gui.gcwarning)" || return 1
+		test 0 = "$(git -C $num/src config gc.auto)" || return 1
 	done
 '
 
@@ -256,7 +256,7 @@ test_expect_success 'scalar reconfigure --all with detached HEADs' '
 		rm -rf $num/src &&
 		git init $num/src &&
 		scalar register $num/src &&
-		git -C $num/src config unset gui.gcwarning &&
+		git -C $num/src config unset gc.auto &&
 		test_commit -C $num/src initial &&
 		git -C $num/src switch --detach HEAD || return 1
 	done &&
@@ -265,7 +265,7 @@ test_expect_success 'scalar reconfigure --all with detached HEADs' '
 
 	for num in $repos
 	do
-		test false = "$(git -C $num/src config gui.gcwarning)" || return 1
+		test 0 = "$(git -C $num/src config gc.auto)" || return 1
 	done
 '
 
@@ -297,7 +297,7 @@ test_expect_success 'scalar supports -c/-C' '
 	git init sub &&
 	scalar -C sub -c status.aheadBehind=bogus register &&
 	test -z "$(git -C sub config --local status.aheadBehind)" &&
-	test false = "$(git -C sub config gui.gcwarning)"
+	test 0 = "$(git -C sub config gc.auto)"
 '
 
 test_expect_success '`scalar [...] <dir>` errors out when dir is missing' '
-- 
2.52.0

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/4] run auto maintenance in git-gui
  2026-03-06  5:15           ` [PATCH 0/4] run auto maintenance in git-gui Wolfgang Faust
                               ` (3 preceding siblings ...)
  2026-03-06  5:32             ` [PATCH 4/4] scalar: remove obsolete gui.GCWarning setting Wolfgang Faust
@ 2026-03-07 11:32             ` Johannes Sixt
  2026-03-07 22:01               ` Junio C Hamano
  4 siblings, 1 reply; 22+ messages in thread
From: Johannes Sixt @ 2026-03-07 11:32 UTC (permalink / raw)
  To: Wolfgang Faust
  Cc: Birger Skogeng Pedersen, Pratyush Yadav, Marc Branchaud, git

Am 06.03.26 um 06:15 schrieb Wolfgang Faust:
> Resurrecting the 2019 conversation "git-gui: disable the "loose objects
> popup" dialog?":
> <https://lore.kernel.org/git/CAGr--=K15nUcnsJWOP87uMMjeQmTgAeO_6hnr12k2zuNQjNyBw@mail.gmail.com/t/#u>
> 
> The consensus there seems to be that git's auto maintenance is now
> good enough and if git-gui implemented the same behavior as `git commit`
> then the "repository currently has approximately %i loose objects"
> dialog would no longer be necessary. This patch series implements that.

Generally, I like the idea.

However, the consequences for users need to be considered. You replace
the custom implementation of `git gc` with `git maintenance run --auto`.
The latter CAN do a lot more than the former. It turns out, that Git GUI
already calls into `git maintance` indirectly via `git merge` and `git
fetch`. So, users who set gui.gcwarning to false (myself included) were
already prone to occasional inadvertent cleanups.

So, users that are hurt by this new change are those where all these
conditions are true:

- They make commits with Git GUI.

- They configure maintenance.* to do more cleanups than the default
confituration (which is the same as `git gc --auto`, I think).

- They never use one of `commit`, `am`, `fetch`, `merge`, `rebase` (and
possibly more) on the command line.

- They never use `git maintenance run` through some other facility.

- They never use Git GUI's "Local Merge" dialog.

- They never use Git GUI's "Fetch From" command.

- They still expect certain stale data to *not* be pruned.

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.

> 
> Wolfgang Faust (4):
>   git-gui: run auto maintenance on commit
>   git-gui: remove hint_gc dialog
>   git-gui: remove "Compress Database" feature
>   scalar: remove obsolete gui.GCWarning setting
> 
>  Documentation/config/gui.adoc |  5 -----
>  Documentation/scalar.adoc     |  6 ------
>  git-gui/git-gui.sh            |  6 ------
>  git-gui/lib/commit.tcl        |  6 ++++++
>  git-gui/lib/database.tcl      | 40 -----------------------------------
>  git-gui/po/bg.po              | 22 -------------------
>  git-gui/po/de.po              | 27 -----------------------
>  git-gui/po/el.po              | 27 -----------------------
>  git-gui/po/fr.po              | 28 ------------------------
>  git-gui/po/hu.po              | 27 -----------------------
>  git-gui/po/it.po              | 26 -----------------------
>  git-gui/po/ja.po              | 26 -----------------------
>  git-gui/po/nb.po              | 27 -----------------------
>  git-gui/po/pt_br.po           | 27 -----------------------
>  git-gui/po/pt_pt.po           | 27 -----------------------
>  git-gui/po/ru.po              | 20 ------------------
>  git-gui/po/sv.po              | 27 -----------------------
>  git-gui/po/vi.po              | 27 -----------------------
>  git-gui/po/zh_cn.po           | 26 -----------------------
>  scalar.c                      |  1 -
>  t/t9210-scalar.sh             | 20 +++++++++---------
>  21 files changed, 16 insertions(+), 432 deletions(-)

Please separate the patches such that they modify either only files in
the git-gui directory or only files outside it. The git-gui/ patches are
applied to my repository at https://github.com/j6t/git-gui. Plan the
patches such that the remaining patches can be applied later when my
repository has been merged into the Git repository.

Please do not modify translation files. It's too much noise. They are
only modified when new translations are contributed.

-- Hannes


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/4] run auto maintenance in git-gui
  2026-03-07 11:32             ` [PATCH 0/4] run auto maintenance in git-gui Johannes Sixt
@ 2026-03-07 22:01               ` Junio C Hamano
  2026-03-07 22:37                 ` Johannes Sixt
  0 siblings, 1 reply; 22+ messages in thread
From: Junio C Hamano @ 2026-03-07 22:01 UTC (permalink / raw)
  To: Johannes Sixt
  Cc: Wolfgang Faust, Birger Skogeng Pedersen, Pratyush Yadav,
	Marc Branchaud, git

Johannes Sixt <j6t@kdbg.org> writes:

> However, the consequences for users need to be considered. You replace
> the custom implementation of `git gc` with `git maintenance run --auto`.
> The latter CAN do a lot more than the former. It turns out, that Git GUI
> already calls into `git maintance` indirectly via `git merge` and `git
> fetch`. So, users who set gui.gcwarning to false (myself included) were
> already prone to occasional inadvertent cleanups.
>
> 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.

Hmph, if you are _declining_ to see the warning, isn't it a sign
that you are getting these warnings and got annoyed enough to find
out about the settings and turned it to "false" to squelch?  And if
we make pruning more aggressive, wouldn't gui.gcwarning explicitly
set to false be a sign that you'd be more likely to be in the
affected poulation?


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/4] run auto maintenance in git-gui
  2026-03-07 22:01               ` Junio C Hamano
@ 2026-03-07 22:37                 ` Johannes Sixt
  2026-03-08  6:02                   ` Junio C Hamano
  2026-03-11  4:48                   ` Wolfgang Faust
  0 siblings, 2 replies; 22+ messages in thread
From: Johannes Sixt @ 2026-03-07 22:37 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Wolfgang Faust, Birger Skogeng Pedersen, Pratyush Yadav,
	Marc Branchaud, git

Am 07.03.26 um 23:01 schrieb Junio C Hamano:
> Johannes Sixt <j6t@kdbg.org> writes:
> 
>> However, the consequences for users need to be considered. You replace
>> the custom implementation of `git gc` with `git maintenance run --auto`.
>> The latter CAN do a lot more than the former. It turns out, that Git GUI
>> already calls into `git maintance` indirectly via `git merge` and `git
>> fetch`. So, users who set gui.gcwarning to false (myself included) were
>> already prone to occasional inadvertent cleanups.
>>
>> 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.
> 
> Hmph, if you are _declining_ to see the warning, isn't it a sign
> that you are getting these warnings and got annoyed enough to find
> out about the settings and turned it to "false" to squelch?

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.

>  And if
> we make pruning more aggressive, wouldn't gui.gcwarning explicitly
> set to false be a sign that you'd be more likely to be in the
> affected poulation?
I think so, too. For this reason, my implied suggestion was to protect
the new call of `git maintenance` with a check whether gui.gcwarning is
enabled. Then we don't make anything worse for those who have it disabled.

-- Hannes


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/4] run auto maintenance in git-gui
  2026-03-07 22:37                 ` Johannes Sixt
@ 2026-03-08  6:02                   ` Junio C Hamano
  2026-03-11  4:48                   ` Wolfgang Faust
  1 sibling, 0 replies; 22+ messages in thread
From: Junio C Hamano @ 2026-03-08  6:02 UTC (permalink / raw)
  To: Johannes Sixt
  Cc: Wolfgang Faust, Birger Skogeng Pedersen, Pratyush Yadav,
	Marc Branchaud, git

Johannes Sixt <j6t@kdbg.org> writes:

> 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.

Ah, OK, now what you said makes perfect sense.

> I think so, too. For this reason, my implied suggestion was to protect
> the new call of `git maintenance` with a check whether gui.gcwarning is
> enabled. Then we don't make anything worse for those who have it disabled.

Good.

Thanks.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/4] run auto maintenance in git-gui
  2026-03-07 22:37                 ` Johannes Sixt
  2026-03-08  6:02                   ` Junio C Hamano
@ 2026-03-11  4:48                   ` Wolfgang Faust
  2026-03-13 12:38                     ` Johannes Sixt
  1 sibling, 1 reply; 22+ messages in thread
From: Wolfgang Faust @ 2026-03-11  4:48 UTC (permalink / raw)
  To: Johannes Sixt, Junio C Hamano
  Cc: Birger Skogeng Pedersen, Pratyush Yadav, Marc Branchaud, git

On Sat, Mar 7, 2026, at 2:37 PM, Johannes Sixt wrote:
> 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.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/4] run auto maintenance in git-gui
  2026-03-11  4:48                   ` Wolfgang Faust
@ 2026-03-13 12:38                     ` Johannes Sixt
  0 siblings, 0 replies; 22+ messages in thread
From: Johannes Sixt @ 2026-03-13 12:38 UTC (permalink / raw)
  To: Wolfgang Faust
  Cc: Birger Skogeng Pedersen, Pratyush Yadav, Marc Branchaud, git,
	Junio C Hamano

Am 11.03.26 um 05:48 schrieb Wolfgang Faust:
> However, it seems to me that the conditions you outlined are very
> unlikely.

This was the whole point of my argument.

> 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?

The system configuration could be set to non-default values.

But it would need quite some determination from a user to side-step any
and all explicit and implicit `git maintenance` calls on such a system
instead of countermanding the configuration in the personal (global or
local) settings.

My point is only that these conditions aren't mutually exclusive, but
still unlikely in practice.

> 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.

Let's just call `git maintenance` on every commit except when, for
legacy reasons, gui.gcwarning is false. No new configuration, please,
until there is proof that Git GUI users really do not want the standard
`git maintenance` behavior.

-- Hannes


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2026-03-13 12:39 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-26 17:31 git-gui: disable the "loose objects popup" dialog? Birger Skogeng Pedersen
2019-09-26 18:54 ` Johannes Sixt
2019-09-26 19:13   ` Birger Skogeng Pedersen
2019-09-26 19:15   ` Pratyush Yadav
2019-09-26 21:12     ` Birger Skogeng Pedersen
2019-09-26 21:13     ` Johannes Sixt
2019-10-01 18:00       ` Pratyush Yadav
2019-10-02  7:12         ` Birger Skogeng Pedersen
2019-10-02 18:48         ` Johannes Sixt
2026-03-06  5:15           ` [PATCH 0/4] run auto maintenance in git-gui Wolfgang Faust
2026-03-06  5:26             ` [PATCH 1/4] git-gui: run auto maintenance on commit Wolfgang Faust
2026-03-06  5:30             ` [PATCH 2/4] git-gui: remove hint_gc dialog Wolfgang Faust
2026-03-06  5:32             ` [PATCH 3/4] git-gui: remove "Compress Database" feature Wolfgang Faust
2026-03-06  5:32             ` [PATCH 4/4] scalar: remove obsolete gui.GCWarning setting Wolfgang Faust
2026-03-07 11:32             ` [PATCH 0/4] run auto maintenance in git-gui Johannes Sixt
2026-03-07 22:01               ` Junio C Hamano
2026-03-07 22:37                 ` Johannes Sixt
2026-03-08  6:02                   ` Junio C Hamano
2026-03-11  4:48                   ` Wolfgang Faust
2026-03-13 12:38                     ` Johannes Sixt
2019-10-02 20:41         ` git-gui: disable the "loose objects popup" dialog? Marc Branchaud
2019-09-26 21:14     ` Marc Branchaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox