From 969e10ec5bb639802d9ea4a4a1bba7526ed86b4e Mon Sep 17 00:00:00 2001 From: Chris McDonnell Date: Sun, 11 May 2025 18:11:17 -0400 Subject: [PATCH] Clear preserved commit message when entering CommitEditorPanel --- pkg/gui/controllers/helpers/working_tree_helper.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/gui/controllers/helpers/working_tree_helper.go b/pkg/gui/controllers/helpers/working_tree_helper.go index 4d0d1e9dab9..8620cc3673a 100644 --- a/pkg/gui/controllers/helpers/working_tree_helper.go +++ b/pkg/gui/controllers/helpers/working_tree_helper.go @@ -136,6 +136,10 @@ func (self *WorkingTreeHelper) switchFromCommitMessagePanelToEditor(filepath str // their editor rather than via the popup panel func (self *WorkingTreeHelper) HandleCommitEditorPress() error { return self.WithEnsureCommittableFiles(func() error { + // See reasoning in switchFromCommitMessagePanelToEditor for why it makes sense + // to clear this message before calling into the editor + self.commitsHelper.OnCommitSuccess() + self.c.LogAction(self.c.Tr.Actions.Commit) return self.c.RunSubprocessAndRefresh( self.c.Git().Commit.CommitEditorCmdObj(),