mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
split context common from helper common
This commit is contained in:
@ -1,23 +1,15 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
)
|
||||
|
||||
type BisectHelper struct {
|
||||
c *types.HelperCommon
|
||||
git *commands.GitCommand
|
||||
c *HelperCommon
|
||||
}
|
||||
|
||||
func NewBisectHelper(
|
||||
c *types.HelperCommon,
|
||||
git *commands.GitCommand,
|
||||
) *BisectHelper {
|
||||
return &BisectHelper{
|
||||
c: c,
|
||||
git: git,
|
||||
}
|
||||
func NewBisectHelper(c *HelperCommon) *BisectHelper {
|
||||
return &BisectHelper{c: c}
|
||||
}
|
||||
|
||||
func (self *BisectHelper) Reset() error {
|
||||
@ -26,7 +18,7 @@ func (self *BisectHelper) Reset() error {
|
||||
Prompt: self.c.Tr.Bisect.ResetPrompt,
|
||||
HandleConfirm: func() error {
|
||||
self.c.LogAction(self.c.Tr.Actions.ResetBisect)
|
||||
if err := self.git.Bisect.Reset(); err != nil {
|
||||
if err := self.c.Git().Bisect.Reset(); err != nil {
|
||||
return self.c.Error(err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user