Skip to content

Commit 2988df7

Browse files
author
Chris McDonnell
committed
Remove guard around clearing commit message
Ever since we removed the other functionality of this function, we have been slowly chipping away at its usages, in commits like 41a7afb. With the commit prior to this, now all usages are from call sites that actually want to clear the message because they have preserveMessage: true in their upstream, so we don't need to check if preserveMessage is true before clearing.
1 parent 4259286 commit 2988df7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/gui/controllers/helpers/commits_helper.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@ func (self *CommitsHelper) OpenCommitMessagePanel(opts *OpenCommitMessagePanelOp
158158
}
159159

160160
func (self *CommitsHelper) ClearPreservedCommitMessage() {
161-
// if we have a preserved message we want to clear it on success
162-
if self.c.Contexts().CommitMessage.GetPreserveMessage() {
163-
self.c.Contexts().CommitMessage.SetPreservedMessageAndLogError("")
164-
}
161+
self.c.Contexts().CommitMessage.SetPreservedMessageAndLogError("")
165162
}
166163

167164
func (self *CommitsHelper) HandleCommitConfirm() error {

0 commit comments

Comments
 (0)