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

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

From
WFWolfgang Faust <contrib-git@wolfgangfaust.com>
Date
Mar 6, 2026, 05:26 UTC
Message-ID
<339285be-38e8-426a-add3-b91e14a8be35@app.fastmail.com>
In-Reply-To
<091e68fa-428d-48b0-bf7d-42b01660d6eb@app.fastmail.com>

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

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.