diff --git a/pkg/gui/controllers.go b/pkg/gui/controllers.go index 277098f3789..e1567098956 100644 --- a/pkg/gui/controllers.go +++ b/pkg/gui/controllers.go @@ -30,8 +30,8 @@ func (gui *Gui) resetHelpersAndControllers() { refsHelper := helpers.NewRefsHelper(helperCommon) suggestionsHelper := helpers.NewSuggestionsHelper(helperCommon) worktreeHelper := helpers.NewWorktreeHelper(helperCommon, reposHelper, refsHelper, suggestionsHelper) - - rebaseHelper := helpers.NewMergeAndRebaseHelper(helperCommon, refsHelper) + gpgHelper := helpers.NewGpgHelper(helperCommon) + rebaseHelper := helpers.NewMergeAndRebaseHelper(helperCommon, refsHelper, gpgHelper) setCommitSummary := gui.getCommitMessageSetTextareaTextFn(func() *gocui.View { return gui.Views.CommitMessage }) setCommitDescription := gui.getCommitMessageSetTextareaTextFn(func() *gocui.View { return gui.Views.CommitDescription }) @@ -53,7 +53,6 @@ func (gui *Gui) resetHelpersAndControllers() { setCommitDescription, ) - gpgHelper := helpers.NewGpgHelper(helperCommon) viewHelper := helpers.NewViewHelper(helperCommon, gui.State.Contexts) patchBuildingHelper := helpers.NewPatchBuildingHelper(helperCommon) stagingHelper := helpers.NewStagingHelper(helperCommon) diff --git a/pkg/gui/controllers/helpers/merge_and_rebase_helper.go b/pkg/gui/controllers/helpers/merge_and_rebase_helper.go index b3e40450708..7456ea49c15 100644 --- a/pkg/gui/controllers/helpers/merge_and_rebase_helper.go +++ b/pkg/gui/controllers/helpers/merge_and_rebase_helper.go @@ -20,15 +20,18 @@ import ( type MergeAndRebaseHelper struct { c *HelperCommon refsHelper *RefsHelper + gpgHelper *GpgHelper } func NewMergeAndRebaseHelper( c *HelperCommon, refsHelper *RefsHelper, + gpgHelper *GpgHelper, ) *MergeAndRebaseHelper { return &MergeAndRebaseHelper{ c: c, refsHelper: refsHelper, + gpgHelper: gpgHelper, } } @@ -127,7 +130,7 @@ func (self *MergeAndRebaseHelper) genericMergeCommand(command string) error { var result error runCmd := self.c.Git().Rebase.GenericMergeOrRebaseActionCmdObj(commandType, command) if self.c.Git().Config.UsingGpg() && command != REBASE_OPTION_ABORT { - result = self.c.RunSubprocessAndRefresh(runCmd) + result = self.gpgHelper.WithGpgHandling(runCmd, self.c.Tr.CommittingStatus, nil) } else { result = self.c.Git().Rebase.AddSkipEditorCommand(runCmd).Run() }