mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Return error from RefreshOptions.Then
This commit is contained in:
parent
bbad3a70ce
commit
653994845e
6 changed files with 20 additions and 14 deletions
|
@ -513,7 +513,7 @@ func (self *LocalCommitsController) startInteractiveRebaseWithEdit(
|
|||
err := self.c.Git().Rebase.EditRebase(commitsToEdit[len(commitsToEdit)-1].Hash)
|
||||
return self.c.Helpers().MergeAndRebase.CheckMergeOrRebaseWithRefreshOptions(
|
||||
err,
|
||||
types.RefreshOptions{Mode: types.BLOCK_UI, Then: func() {
|
||||
types.RefreshOptions{Mode: types.BLOCK_UI, Then: func() error {
|
||||
todos := make([]*models.Commit, 0, len(commitsToEdit)-1)
|
||||
for _, c := range commitsToEdit[:len(commitsToEdit)-1] {
|
||||
// Merge commits can't be set to "edit", so just skip them
|
||||
|
@ -524,7 +524,7 @@ func (self *LocalCommitsController) startInteractiveRebaseWithEdit(
|
|||
if len(todos) > 0 {
|
||||
err := self.updateTodos(todo.Edit, todos)
|
||||
if err != nil {
|
||||
_ = self.c.Error(err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -540,6 +540,7 @@ func (self *LocalCommitsController) startInteractiveRebaseWithEdit(
|
|||
if ok1 && ok2 {
|
||||
self.context().SetSelectionRangeAndMode(newSelectedIdx, newRangeStartIdx, rangeSelectMode)
|
||||
}
|
||||
return nil
|
||||
}})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue