From ce6388bdfa23a33a0e94400d5992a62f854dd38c Mon Sep 17 00:00:00 2001 From: Neko Box Coder Date: Sat, 10 Aug 2024 13:24:39 +0100 Subject: [PATCH] Adding guard to not do reword under git_commands when using gpg --- pkg/commands/git_commands/rebase.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/commands/git_commands/rebase.go b/pkg/commands/git_commands/rebase.go index 59c2c6833..019d58e3a 100644 --- a/pkg/commands/git_commands/rebase.go +++ b/pkg/commands/git_commands/rebase.go @@ -35,6 +35,10 @@ func NewRebaseCommands( } func (self *RebaseCommands) RewordCommit(commits []*models.Commit, index int, summary string, description string) error { + if self.config.UsingGpg() { + return errors.New(self.Tr.DisabledForGPG) + } + if models.IsHeadCommit(commits, index) { // we've selected the top commit so no rebase is required return self.commit.RewordLastCommit(summary, description)