Skip to content

Commit

Permalink
fixup! Allow rewording for last commit using GPG
Browse files Browse the repository at this point in the history
Reduce code noise by using nil instead of an empty function that returns nil
  • Loading branch information
stefanhaller committed Aug 15, 2024
1 parent 34504f5 commit e6ed119
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/gui/controllers/local_commits_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,7 @@ func (self *LocalCommitsController) handleReword(summary string, description str
if models.IsHeadCommit(self.c.Model().Commits, self.c.Contexts().LocalCommits.GetSelectedLineIdx()) {
// we've selected the top commit so no rebase is required
err = self.c.Helpers().GPG.WithGpgHandling(self.c.Git().Commit.RewordLastCommit(summary, description),
self.c.Tr.CommittingStatus, func() error {
return nil
})
self.c.Tr.CommittingStatus, nil)
} else {
err = self.c.Git().Rebase.RewordCommit(self.c.Model().Commits, self.c.Contexts().LocalCommits.GetSelectedLineIdx(), summary, description)
}
Expand Down

0 comments on commit e6ed119

Please sign in to comment.