@@ -322,7 +322,7 @@ func secondaryPatchPanelUpdateOpts(c *ControllerCommon) *types.ViewUpdateOpts {
322322
323323func (self * LocalCommitsController ) squashDown (selectedCommits []* models.Commit , startIdx int , endIdx int ) error {
324324 if self .isRebasing () {
325- return self .updateTodos (todo .Squash , selectedCommits )
325+ return self .updateTodos (todo .Squash , "" , selectedCommits )
326326 }
327327
328328 self .c .Confirm (types.ConfirmOpts {
@@ -331,7 +331,7 @@ func (self *LocalCommitsController) squashDown(selectedCommits []*models.Commit,
331331 HandleConfirm : func () error {
332332 return self .c .WithWaitingStatus (self .c .Tr .SquashingStatus , func (gocui.Task ) error {
333333 self .c .LogAction (self .c .Tr .Actions .SquashCommitDown )
334- return self .interactiveRebase (todo .Squash , startIdx , endIdx )
334+ return self .interactiveRebase (todo .Squash , "" , startIdx , endIdx )
335335 })
336336 },
337337 })
@@ -341,7 +341,7 @@ func (self *LocalCommitsController) squashDown(selectedCommits []*models.Commit,
341341
342342func (self * LocalCommitsController ) fixup (selectedCommits []* models.Commit , startIdx int , endIdx int ) error {
343343 if self .isRebasing () {
344- return self .updateTodos (todo .Fixup , selectedCommits )
344+ return self .updateTodos (todo .Fixup , "" , selectedCommits )
345345 }
346346
347347 self .c .Confirm (types.ConfirmOpts {
@@ -350,7 +350,7 @@ func (self *LocalCommitsController) fixup(selectedCommits []*models.Commit, star
350350 HandleConfirm : func () error {
351351 return self .c .WithWaitingStatus (self .c .Tr .FixingStatus , func (gocui.Task ) error {
352352 self .c .LogAction (self .c .Tr .Actions .FixupCommit )
353- return self .interactiveRebase (todo .Fixup , startIdx , endIdx )
353+ return self .interactiveRebase (todo .Fixup , "" , startIdx , endIdx )
354354 })
355355 },
356356 })
@@ -485,14 +485,14 @@ func (self *LocalCommitsController) drop(selectedCommits []*models.Commit, start
485485
486486 self .context ().SetSelectionRangeAndMode (selectedIdx , rangeStartIdx , rangeSelectMode )
487487
488- return self .updateTodos (todo .Drop , nonUpdateRefTodos )
488+ return self .updateTodos (todo .Drop , "" , nonUpdateRefTodos )
489489 },
490490 })
491491
492492 return nil
493493 }
494494
495- return self .updateTodos (todo .Drop , selectedCommits )
495+ return self .updateTodos (todo .Drop , "" , selectedCommits )
496496 }
497497
498498 isMerge := selectedCommits [0 ].IsMerge ()
@@ -506,7 +506,7 @@ func (self *LocalCommitsController) drop(selectedCommits []*models.Commit, start
506506 if isMerge {
507507 return self .dropMergeCommit (startIdx )
508508 }
509- return self .interactiveRebase (todo .Drop , startIdx , endIdx )
509+ return self .interactiveRebase (todo .Drop , "" , startIdx , endIdx )
510510 })
511511 },
512512 })
@@ -521,13 +521,13 @@ func (self *LocalCommitsController) dropMergeCommit(commitIdx int) error {
521521
522522func (self * LocalCommitsController ) edit (selectedCommits []* models.Commit , startIdx int , endIdx int ) error {
523523 if self .isRebasing () {
524- return self .updateTodos (todo .Edit , selectedCommits )
524+ return self .updateTodos (todo .Edit , "" , selectedCommits )
525525 }
526526
527527 commits := self .c .Model ().Commits
528528 if ! commits [endIdx ].IsMerge () {
529529 selectionRangeAndMode := self .getSelectionRangeAndMode ()
530- err := self .c .Git ().Rebase .InteractiveRebase (commits , startIdx , endIdx , todo .Edit )
530+ err := self .c .Git ().Rebase .InteractiveRebase (commits , startIdx , endIdx , todo .Edit , "" )
531531 return self .c .Helpers ().MergeAndRebase .CheckMergeOrRebaseWithRefreshOptions (
532532 err ,
533533 types.RefreshOptions {
@@ -568,7 +568,7 @@ func (self *LocalCommitsController) startInteractiveRebaseWithEdit(
568568 }
569569 }
570570 if len (todos ) > 0 {
571- err := self .updateTodos (todo .Edit , todos )
571+ err := self .updateTodos (todo .Edit , "" , todos )
572572 if err != nil {
573573 return err
574574 }
@@ -628,31 +628,31 @@ func (self *LocalCommitsController) findCommitForQuickStartInteractiveRebase() (
628628
629629func (self * LocalCommitsController ) pick (selectedCommits []* models.Commit ) error {
630630 if self .isRebasing () {
631- return self .updateTodos (todo .Pick , selectedCommits )
631+ return self .updateTodos (todo .Pick , "" , selectedCommits )
632632 }
633633
634634 // at this point we aren't actually rebasing so we will interpret this as an
635635 // attempt to pull. We might revoke this later after enabling configurable keybindings
636636 return self .pullFiles ()
637637}
638638
639- func (self * LocalCommitsController ) interactiveRebase (action todo.TodoCommand , startIdx int , endIdx int ) error {
639+ func (self * LocalCommitsController ) interactiveRebase (action todo.TodoCommand , flag string , startIdx int , endIdx int ) error {
640640 // When performing an action that will remove the selected commits, we need to select the
641641 // next commit down (which will end up at the start index after the action is performed)
642642 if action == todo .Drop || action == todo .Fixup || action == todo .Squash {
643643 self .context ().SetSelection (startIdx )
644644 }
645645
646- err := self .c .Git ().Rebase .InteractiveRebase (self .c .Model ().Commits , startIdx , endIdx , action )
646+ err := self .c .Git ().Rebase .InteractiveRebase (self .c .Model ().Commits , startIdx , endIdx , action , flag )
647647
648648 return self .c .Helpers ().MergeAndRebase .CheckMergeOrRebase (err )
649649}
650650
651651// updateTodos sees if the selected commit is in fact a rebasing
652652// commit meaning you are trying to edit the todo file rather than actually
653653// begin a rebase. It then updates the todo file with that action
654- func (self * LocalCommitsController ) updateTodos (action todo.TodoCommand , selectedCommits []* models.Commit ) error {
655- if err := self .c .Git ().Rebase .EditRebaseTodo (selectedCommits , action ); err != nil {
654+ func (self * LocalCommitsController ) updateTodos (action todo.TodoCommand , flag string , selectedCommits []* models.Commit ) error {
655+ if err := self .c .Git ().Rebase .EditRebaseTodo (selectedCommits , action , flag ); err != nil {
656656 return err
657657 }
658658
0 commit comments