summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/helpers/cherry_pick_helper.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-03-23 12:35:07 +1100
committerJesse Duffield <jessedduffield@gmail.com>2023-04-30 13:19:53 +1000
commit43251e727596cca2538548976769e47a1bfc5593 (patch)
tree280e4f0609ca58bbbaeb80446fa0d14a7e58a993 /pkg/gui/controllers/helpers/cherry_pick_helper.go
parentf08135894344583394240f240377015ea874b03b (diff)
split context common from helper common
Diffstat (limited to 'pkg/gui/controllers/helpers/cherry_pick_helper.go')
-rw-r--r--pkg/gui/controllers/helpers/cherry_pick_helper.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/pkg/gui/controllers/helpers/cherry_pick_helper.go b/pkg/gui/controllers/helpers/cherry_pick_helper.go
index 84b77a299..695a726ae 100644
--- a/pkg/gui/controllers/helpers/cherry_pick_helper.go
+++ b/pkg/gui/controllers/helpers/cherry_pick_helper.go
@@ -1,7 +1,6 @@
package helpers
import (
- "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/gui/context"
"github.com/jesseduffield/lazygit/pkg/gui/modes/cherrypicking"
@@ -9,9 +8,7 @@ import (
)
type CherryPickHelper struct {
- c *types.HelperCommon
-
- git *commands.GitCommand
+ c *HelperCommon
contexts *context.ContextTree
@@ -22,14 +19,12 @@ type CherryPickHelper struct {
// even if in truth we're running git cherry-pick
func NewCherryPickHelper(
- c *types.HelperCommon,
- git *commands.GitCommand,
+ c *HelperCommon,
contexts *context.ContextTree,
rebaseHelper *MergeAndRebaseHelper,
) *CherryPickHelper {
return &CherryPickHelper{
c: c,
- git: git,
contexts: contexts,
rebaseHelper: rebaseHelper,
}
@@ -87,7 +82,7 @@ func (self *CherryPickHelper) Paste() error {
HandleConfirm: func() error {
return self.c.WithWaitingStatus(self.c.Tr.CherryPickingStatus, func() error {
self.c.LogAction(self.c.Tr.Actions.CherryPick)
- err := self.git.Rebase.CherryPickCommits(self.getData().CherryPickedCommits)
+ err := self.c.Git().Rebase.CherryPickCommits(self.getData().CherryPickedCommits)
return self.rebaseHelper.CheckMergeOrRebase(err)
})
},