From 04bacbf9cef59cbd9a126f18445a554be765f250 Mon Sep 17 00:00:00 2001 From: Chris McDonnell Date: Thu, 15 May 2025 18:30:45 +0200 Subject: [PATCH] Remove the if statement from OnCommitSuccess Previously it would only clear the message if the panel had been opened with preserveMessage=true; we don't need this check, because callers know how they opened the panel, and whether they want to clear the message. --- pkg/gui/controllers/helpers/commits_helper.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/gui/controllers/helpers/commits_helper.go b/pkg/gui/controllers/helpers/commits_helper.go index 9d2fcd164..188e9d60a 100644 --- a/pkg/gui/controllers/helpers/commits_helper.go +++ b/pkg/gui/controllers/helpers/commits_helper.go @@ -159,9 +159,7 @@ func (self *CommitsHelper) OpenCommitMessagePanel(opts *OpenCommitMessagePanelOp func (self *CommitsHelper) OnCommitSuccess() { // if we have a preserved message we want to clear it on success - if self.c.Contexts().CommitMessage.GetPreserveMessage() { - self.c.Contexts().CommitMessage.SetPreservedMessageAndLogError("") - } + self.c.Contexts().CommitMessage.SetPreservedMessageAndLogError("") } func (self *CommitsHelper) HandleCommitConfirm() error {