Skip to content

Commit

Permalink
Added check to invoke continue/refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
glvr182 authored and jesseduffield committed Dec 10, 2018
1 parent 7a7e885 commit e39d2ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/gui/branches_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,16 @@ func (gui *Gui) handleRebase(g *gocui.Gui, v *gocui.View) error {
}

if err := gui.GitCommand.RebaseBranch(selectedBranch); err != nil {
gui.Log.Errorln(err)
if err := gui.createConfirmationPanel(g, v, "Rebase failed", "Rebasing failed, would you like to resolve it?",
func(g *gocui.Gui, v *gocui.View) error {
return nil
},
func(g *gocui.Gui, v *gocui.View) error {
}, func(g *gocui.Gui, v *gocui.View) error {
return gui.GitCommand.AbortRebaseBranch()
}); err != nil {
}
}

gui.Log.Println("Reached refresh")
return gui.refreshSidePanels(g)
}, nil)
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/gui/merge_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,5 +256,9 @@ func (gui *Gui) handleCompleteMerge(g *gocui.Gui) error {
}
gui.stageSelectedFile(g)
gui.refreshFiles(g)
if rebase, err := gui.GitCommand.IsInRebaseState(); rebase && err == nil {
gui.GitCommand.ContinueRebaseBranch()
gui.refreshSidePanels(g)
}
return gui.switchFocus(g, nil, filesView)
}

0 comments on commit e39d2ed

Please sign in to comment.