1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-19 17:02:18 +03:00
lazygit/pkg/gui/controllers/helpers/amend_helper.go
2025-03-24 08:41:58 +01:00

25 lines
523 B
Go

package helpers
import "github.com/jesseduffield/lazygit/pkg/commands/git_commands"
type AmendHelper struct {
c *HelperCommon
gpg *GpgHelper
}
func NewAmendHelper(
c *HelperCommon,
gpg *GpgHelper,
) *AmendHelper {
return &AmendHelper{
c: c,
gpg: gpg,
}
}
func (self *AmendHelper) AmendHead() error {
cmdObj := self.c.Git().Commit.AmendHeadCmdObj()
self.c.LogAction(self.c.Tr.Actions.AmendCommit)
return self.gpg.WithGpgHandling(cmdObj, git_commands.CommitGpgSign, self.c.Tr.AmendingStatus, nil, nil)
}