{"thread":{"id":"65149","subject":"[PATCH 1/4] git-gui: run auto maintenance on commit","startedAt":"2026-03-06T05:19:45Z","lastAt":"2026-03-06T05:19:45Z","messageCount":1,"participants":["Wolfgang Faust"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"538058","messageId":"3d03bf2a-d2e2-4dc7-8ec5-057fd87c5986@app.fastmail.com","threadId":"65149","inReplyTo":"cover.1772573786.git.contrib-git@wolfgangfaust.com","subject":"[PATCH 1/4] git-gui: run auto maintenance on commit","fromName":"Wolfgang Faust","fromEmail":"contrib-git@wolfgangfaust.com","sentAt":"2026-03-06T05:19:22Z","receivedAt":"2026-03-06T05:19:45Z","isPatch":true,"sender":{"key":"contrib-git@wolfgangfaust.com","avatar":null},"body":"This implements the same behavior as seen in builtin/commit.c:\nrun auto maintenance between rerere and the post-commit hook.\n\nSigned-off-by: Wolfgang Faust <contrib-git@wolfgangfaust.com>\n---\nThis always detaches rather than honoring autoDetach (unlike\nrun_auto_maintenance()) because I can't think of a circumstance where\nyou'd want the GUI to block.\n\n git-gui/lib/commit.tcl | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl\nindex 89eb8c7b73..4b07cb3bbb 100644\n--- a/git-gui/lib/commit.tcl\n+++ b/git-gui/lib/commit.tcl\n@@ -477,6 +477,12 @@ A rescan will be automatically started now.\n \t\tcatch {git rerere}\n \t}\n \n+\t# -- Run auto maintenance (e.g. garbage collection)\n+\t#\n+\tif {[is_config_true maintenance.auto]} {\n+\t\tcatch {exec git maintenance run --auto --quiet --detach}\n+\t}\n+\n \t# -- Run the post-commit hook.\n \t#\n \tset fd_ph [githook_read post-commit]\n-- \n2.52.0\n\n"}]}