From b09000194a571579dddb1f0793a4d8c5d0e8d99c Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 18 Apr 2023 17:33:33 +0200 Subject: [PATCH] Allow resetting author of HEAD commit during rebase --- pkg/commands/git_commands/rebase.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/git_commands/rebase.go b/pkg/commands/git_commands/rebase.go index cffc5d68a..5828ffbaa 100644 --- a/pkg/commands/git_commands/rebase.go +++ b/pkg/commands/git_commands/rebase.go @@ -79,7 +79,7 @@ func (self *RebaseCommands) SetCommitAuthor(commits []*models.Commit, index int, } func (self *RebaseCommands) GenericAmend(commits []*models.Commit, index int, f func() error) error { - if index == 0 { + if models.IsHeadCommit(commits, index) { // we've selected the top commit so no rebase is required return f() }