Thread (1 message) 1 message, 1 author, 2026-03-06
DORMANTno replies

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

From: Wolfgang Faust <hidden>
Date: 2026-03-06 05:19:45
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

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 <redacted>
---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help