88 "os/exec"
99 "strconv"
1010
11- "github.com/jesseduffield/lazygit/pkg/commands/models"
1211 "github.com/jesseduffield/lazygit/pkg/common"
1312 "github.com/jesseduffield/lazygit/pkg/utils"
1413 "github.com/samber/lo"
@@ -33,7 +32,6 @@ const (
3332
3433 DaemonKindExitImmediately
3534 DaemonKindRemoveUpdateRefsForCopiedBranch
36- DaemonKindCherryPick
3735 DaemonKindMoveTodosUp
3836 DaemonKindMoveTodosDown
3937 DaemonKindInsertBreak
@@ -56,7 +54,6 @@ func getInstruction() Instruction {
5654 mapping := map [DaemonKind ]func (string ) Instruction {
5755 DaemonKindExitImmediately : deserializeInstruction [* ExitImmediatelyInstruction ],
5856 DaemonKindRemoveUpdateRefsForCopiedBranch : deserializeInstruction [* RemoveUpdateRefsForCopiedBranchInstruction ],
59- DaemonKindCherryPick : deserializeInstruction [* CherryPickCommitsInstruction ],
6057 DaemonKindChangeTodoActions : deserializeInstruction [* ChangeTodoActionsInstruction ],
6158 DaemonKindDropMergeCommit : deserializeInstruction [* DropMergeCommitInstruction ],
6259 DaemonKindMoveFixupCommitDown : deserializeInstruction [* MoveFixupCommitDownInstruction ],
@@ -180,39 +177,6 @@ func NewRemoveUpdateRefsForCopiedBranchInstruction() Instruction {
180177 return & RemoveUpdateRefsForCopiedBranchInstruction {}
181178}
182179
183- type CherryPickCommitsInstruction struct {
184- Todo string
185- }
186-
187- func NewCherryPickCommitsInstruction (commits []* models.Commit ) Instruction {
188- todoLines := lo .Map (commits , func (commit * models.Commit , _ int ) TodoLine {
189- return TodoLine {
190- Action : "pick" ,
191- Commit : commit ,
192- }
193- })
194-
195- todo := TodoLinesToString (todoLines )
196-
197- return & CherryPickCommitsInstruction {
198- Todo : todo ,
199- }
200- }
201-
202- func (self * CherryPickCommitsInstruction ) Kind () DaemonKind {
203- return DaemonKindCherryPick
204- }
205-
206- func (self * CherryPickCommitsInstruction ) SerializedInstructions () string {
207- return serializeInstruction (self )
208- }
209-
210- func (self * CherryPickCommitsInstruction ) run (common * common.Common ) error {
211- return handleInteractiveRebase (common , func (path string ) error {
212- return utils .PrependStrToTodoFile (path , []byte (self .Todo ))
213- })
214- }
215-
216180type ChangeTodoActionsInstruction struct {
217181 Changes []ChangeTodoAction
218182}
0 commit comments