8
8
"os/exec"
9
9
"strconv"
10
10
11
- "github.com/jesseduffield/lazygit/pkg/commands/models"
12
11
"github.com/jesseduffield/lazygit/pkg/common"
13
12
"github.com/jesseduffield/lazygit/pkg/utils"
14
13
"github.com/samber/lo"
@@ -33,7 +32,6 @@ const (
33
32
34
33
DaemonKindExitImmediately
35
34
DaemonKindRemoveUpdateRefsForCopiedBranch
36
- DaemonKindCherryPick
37
35
DaemonKindMoveTodosUp
38
36
DaemonKindMoveTodosDown
39
37
DaemonKindInsertBreak
@@ -56,7 +54,6 @@ func getInstruction() Instruction {
56
54
mapping := map [DaemonKind ]func (string ) Instruction {
57
55
DaemonKindExitImmediately : deserializeInstruction [* ExitImmediatelyInstruction ],
58
56
DaemonKindRemoveUpdateRefsForCopiedBranch : deserializeInstruction [* RemoveUpdateRefsForCopiedBranchInstruction ],
59
- DaemonKindCherryPick : deserializeInstruction [* CherryPickCommitsInstruction ],
60
57
DaemonKindChangeTodoActions : deserializeInstruction [* ChangeTodoActionsInstruction ],
61
58
DaemonKindDropMergeCommit : deserializeInstruction [* DropMergeCommitInstruction ],
62
59
DaemonKindMoveFixupCommitDown : deserializeInstruction [* MoveFixupCommitDownInstruction ],
@@ -180,39 +177,6 @@ func NewRemoveUpdateRefsForCopiedBranchInstruction() Instruction {
180
177
return & RemoveUpdateRefsForCopiedBranchInstruction {}
181
178
}
182
179
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
-
216
180
type ChangeTodoActionsInstruction struct {
217
181
Changes []ChangeTodoAction
218
182
}
0 commit comments