From: "Wolfgang Faust" <contrib-git@wolfgangfaust•com>
To: git@vger•kernel.org
Cc: "Johannes Sixt" <j6t@kdbg•org>
Subject: [PATCH 1/4] git-gui: run auto maintenance on commit
Date: Thu, 05 Mar 2026 21:19:22 -0800 [thread overview]
Message-ID: <3d03bf2a-d2e2-4dc7-8ec5-057fd87c5986@app.fastmail.com> (raw)
In-Reply-To: <cover.1772573786.git.contrib-git@wolfgangfaust.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 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
next parent reply other threads:[~2026-03-06 5:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1772573786.git.contrib-git@wolfgangfaust.com>
2026-03-06 5:19 ` Wolfgang Faust [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d03bf2a-d2e2-4dc7-8ec5-057fd87c5986@app.fastmail.com \
--to=contrib-git@wolfgangfaust$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=j6t@kdbg$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox