Skip to contentSkip to conversation

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

PATCH In review Birger Skogeng Pedersen 6 participants 22 messages Sep 26, 2019 – Mar 13 Documentation

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:

Quoted 8 lines

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

Quoted 6 lines

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

Quoted 4 lines

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

#2 lore raw

Hi Johannes,

Quoted 3 lines · Johannes Sixt

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.

Quoted 1 line

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

#3 lore raw
In reply to Johannes Sixt
Quoted 11 lines · Johannes Sixt

Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:

Quoted 10 lines

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

Quoted 8 lines
Quoted 4 lines

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.

Quoted 2 lines
Quoted 2 lines

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?

Quoted 4 lines
Quoted 2 lines

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

Signature · 2 lines
Regards,
Pratyush Yadav
#4 lore raw
Quoted 4 lines · Pratyush Yadav

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.

Quoted 2 lines

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

#5 lore raw
In reply to Pratyush Yadav

Am 26.09.19 um 21:15 schrieb Pratyush Yadav:

Quoted 4 lines

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.

Quoted 2 lines

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.

Quoted 4 lines
Quoted 1 line

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.

Quoted 5 lines

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

#6 lore raw
Quoted 28 lines · Johannes Sixt

Am 26.09.19 um 21:15 schrieb Pratyush Yadav:

Quoted 4 lines

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.

Quoted 2 lines

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.

Quoted 4 lines
Quoted 1 line

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.

Quoted 5 lines

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?

Quoted 7 lines

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?

Signature · 2 lines
Regards,
Pratyush Yadav
#7 lore raw
Quoted 8 lines · 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.

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

#8 lore raw
In reply to Pratyush Yadav

Am 01.10.19 um 20:00 schrieb Pratyush Yadav:

Quoted 4 lines

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

#9 lore raw

cover run auto maintenance in git-gui

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

Signature · 1 line
2.52.0
#10 lore raw

PATCH 1/4 git-gui: run auto maintenance on commit

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

---
(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(+)
git-gui/lib/commit.tcl +6 -0
index 89eb8c7b73..4b07cb3bbb 100644
@@ -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]
Signature · 1 line
2.52.0
#11 lore raw

PATCH 2/4 git-gui: remove hint_gc dialog

In reply to Wolfgang Faust

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.

---
 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(-)
Documentation/config/gui.adoc +0 -5
index 1565c0af19..171be774d2 100644
@@ -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".
git-gui/git-gui.sh +0 -3
index d3d3aa14a9..29b708f9c8 100755
@@ -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}
 }
git-gui/lib/database.tcl +0 -26
index 78732d8651..9b4cc98df5 100644
@@ -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
-		}
-	}
-}
git-gui/po/bg.po +0 -16
index ff5adb25cc..2670bbb4ef 100644
@@ -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"
git-gui/po/de.po +0 -17
index a8d5f61ca3..490ed25e0d 100644
@@ -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"
git-gui/po/el.po +0 -17
index 3634ba469d..1c77b98b14 100644
@@ -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"
git-gui/po/fr.po +0 -18
index 878df65399..9da3e09ba2 100644
@@ -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"
git-gui/po/hu.po +0 -17
index d106dadac8..4404af74d6 100644
@@ -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"
git-gui/po/it.po +0 -16
index 1bd8b8e04f..b590dfbbd0 100644
@@ -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"
git-gui/po/ja.po +0 -16
index 2f61153ab9..d52bcd7f8c 100644
@@ -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"
git-gui/po/nb.po +0 -17
index d66aa50263..4b6e5136b0 100644
@@ -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"
git-gui/po/pt_br.po +0 -17
index bad116c780..8580aaaece 100644
@@ -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"
git-gui/po/pt_pt.po +0 -17
index 0ef3c7927d..e6354ce5c0 100644
@@ -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"
git-gui/po/ru.po +0 -10
index 7aebaf809d..4761cc1adb 100644
@@ -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"
git-gui/po/sv.po +0 -17
index de65c18584..06835f133a 100644
@@ -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"
git-gui/po/vi.po +0 -17
index d956b59a9e..ad0ec7816c 100644
@@ -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"
git-gui/po/zh_cn.po +0 -16
index 91c1be23c2..4412d4ea44 100644
@@ -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"
Signature · 1 line
2.52.0
#12 lore raw

PATCH 3/4 git-gui: remove "Compress Database" feature

In reply to Wolfgang Faust

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.

---
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(-)
git-gui/git-gui.sh +0 -3
index 29b708f9c8..d2f3ff3e96 100755
@@ -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
 
git-gui/lib/database.tcl +0 -14
index 9b4cc98df5..7edb45b5c8 100644
@@ -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"]]
git-gui/po/bg.po +0 -6
index 2670bbb4ef..c7f3e57a58 100644
@@ -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“"
 
git-gui/po/de.po +0 -10
index 490ed25e0d..c9d197335e 100644
@@ -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"
git-gui/po/el.po +0 -10
index 1c77b98b14..5f780f4c5b 100644
@@ -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 ""
git-gui/po/fr.po +0 -10
index 9da3e09ba2..d0354ed8ff 100644
@@ -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"
git-gui/po/hu.po +0 -10
index 4404af74d6..8141ab13f3 100644
@@ -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"
git-gui/po/it.po +0 -10
index b590dfbbd0..6e9b8d97b7 100644
@@ -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"
git-gui/po/ja.po +0 -10
index d52bcd7f8c..31b59c8e58 100644
@@ -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 でオブジェクト・データベースを検証しています"
git-gui/po/nb.po +0 -10
index 4b6e5136b0..41b8eb9b51 100644
@@ -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"
git-gui/po/pt_br.po +0 -10
index 8580aaaece..327708b511 100644
@@ -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"
git-gui/po/pt_pt.po +0 -10
index e6354ce5c0..498700c91f 100644
@@ -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"
git-gui/po/ru.po +0 -10
index 4761cc1adb..8151f02d8a 100644
@@ -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"
git-gui/po/sv.po +0 -10
index 06835f133a..9509fcda0a 100644
@@ -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"
git-gui/po/vi.po +0 -10
index ad0ec7816c..67b9ee534f 100644
@@ -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"
git-gui/po/zh_cn.po +0 -10
index 4412d4ea44..f7d290af7d 100644
@@ -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 验证对象数据库"
Signature · 1 line
2.52.0
#13 lore raw

PATCH 4/4 scalar: remove obsolete gui.GCWarning setting

In reply to Wolfgang Faust

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.

---
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(-)
Documentation/scalar.adoc +0 -6
index 5252fb134a..4dbe976b65 100644
@@ -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.
scalar.c +0 -1
index 4efb6ac36d..0a6359ec6d 100644
@@ -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" },
t/t9210-scalar.sh +10 -10
index 009437a5f3..55f73939bb 100755
@@ -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' '
Signature · 1 line
2.52.0
#14 lore raw

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

In reply to Wolfgang Faust

Am 06.03.26 um 06:15 schrieb Wolfgang Faust:

Quoted 8 lines

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.

Quoted 21 lines

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 -----------------------
Quoted 8 lines
 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

#15 lore raw

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

Quoted 7 lines · Johannes Sixt

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.

Quoted 6 lines

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?

#16 lore raw

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

Am 07.03.26 um 23:01 schrieb Junio C Hamano:

Quoted 16 lines
Quoted 7 lines · Johannes Sixt

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.

Quoted 6 lines

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.

Quoted 3 lines

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.

Quoted 4 lines

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

#17 lore raw

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

Quoted 4 lines · Johannes Sixt

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.

Quoted 3 lines

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.

#18 lore raw

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

In reply to Johannes Sixt
Quoted 9 lines · Johannes Sixt

Am 07.03.26 um 23:01 schrieb Junio C Hamano:

Quoted 7 lines
Quoted 6 lines · Johannes Sixt

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.

Quoted 6 lines

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:

Quoted 4 lines

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

#19 lore raw

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

Am 11.03.26 um 05:48 schrieb Wolfgang Faust:

Quoted 2 lines

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

This was the whole point of my argument.

Quoted 9 lines

In particular:

Quoted 4 lines

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

Quoted 9 lines

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.

Quoted 6 lines

#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

#20 lore raw
In reply to Pratyush Yadav
Quoted 6 lines · 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.

Quoted 6 lines

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.
#21 lore raw
In reply to Pratyush Yadav
Quoted 25 lines · Pratyush Yadav
Quoted 11 lines · Johannes Sixt

Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:

Quoted 10 lines

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

Quoted 8 lines
Quoted 4 lines

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.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

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.

Quoted 2 lines

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.
Quoted 15 lines
Quoted 4 lines
Quoted 2 lines

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