mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
standardise helper args
This commit is contained in:
@ -1,24 +1,20 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
)
|
||||
|
||||
type AmendHelper struct {
|
||||
c *types.HelperCommon
|
||||
git *commands.GitCommand
|
||||
c *HelperCommon
|
||||
gpg *GpgHelper
|
||||
}
|
||||
|
||||
func NewAmendHelper(
|
||||
c *types.HelperCommon,
|
||||
git *commands.GitCommand,
|
||||
c *HelperCommon,
|
||||
gpg *GpgHelper,
|
||||
) *AmendHelper {
|
||||
return &AmendHelper{
|
||||
c: c,
|
||||
git: git,
|
||||
gpg: gpg,
|
||||
}
|
||||
}
|
||||
@ -28,7 +24,7 @@ func (self *AmendHelper) AmendHead() error {
|
||||
Title: self.c.Tr.AmendLastCommitTitle,
|
||||
Prompt: self.c.Tr.SureToAmend,
|
||||
HandleConfirm: func() error {
|
||||
cmdObj := self.git.Commit.AmendHeadCmdObj()
|
||||
cmdObj := self.c.Git().Commit.AmendHeadCmdObj()
|
||||
self.c.LogAction(self.c.Tr.Actions.AmendCommit)
|
||||
return self.gpg.WithGpgHandling(cmdObj, self.c.Tr.AmendingStatus, nil)
|
||||
},
|
||||
|
Reference in New Issue
Block a user