1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-24 05:36:19 +02:00
lazygit/pkg/gui/controllers/helpers/amend_helper.go

23 lines
421 B
Go
Raw Normal View History

package helpers
type AmendHelper struct {
2023-03-23 12:53:18 +11:00
c *HelperCommon
gpg *GpgHelper
}
func NewAmendHelper(
2023-03-23 12:53:18 +11:00
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, self.c.Tr.AmendingStatus, nil)
}