1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Rename OnCommitSuccess to ClearPreservedCommitMessage

In one case it was actually called *before* making a commit (when switching from
the commit message panel to committing in the editor). And clearing the
preserved message is the only thing it does, so name it after what it does
rather than when it's called.
This commit is contained in:
Chris McDonnell
2025-05-15 18:27:53 +02:00
committed by Stefan Haller
parent 04bacbf9ce
commit 47f1d847f1
2 changed files with 3 additions and 4 deletions

View File

@ -157,8 +157,7 @@ func (self *CommitsHelper) OpenCommitMessagePanel(opts *OpenCommitMessagePanelOp
self.c.Context().Push(self.c.Contexts().CommitMessage, types.OnFocusOpts{})
}
func (self *CommitsHelper) OnCommitSuccess() {
// if we have a preserved message we want to clear it on success
func (self *CommitsHelper) ClearPreservedCommitMessage() {
self.c.Contexts().CommitMessage.SetPreservedMessageAndLogError("")
}