mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-30 09:16:47 +02:00
only use subprocess for merging, not rebasing
This commit is contained in:
parent
9489a94473
commit
a365615490
@ -112,9 +112,12 @@ func (gui *Gui) handleRebase(g *gocui.Gui, v *gocui.View) error {
|
||||
}
|
||||
|
||||
if err := gui.GitCommand.RebaseBranch(selectedBranch); err != nil {
|
||||
if err := gui.refreshSidePanels(g); err != nil {
|
||||
return err
|
||||
}
|
||||
return gui.createConfirmationPanel(g, v, "Auto-rebase failed", gui.Tr.SLocalize("FoundConflicts"),
|
||||
func(g *gocui.Gui, v *gocui.View) error {
|
||||
return nil
|
||||
return gui.refreshSidePanels(g)
|
||||
}, func(g *gocui.Gui, v *gocui.View) error {
|
||||
if err := gui.GitCommand.AbortRebaseBranch(); err != nil {
|
||||
return err
|
||||
|
@ -51,11 +51,15 @@ func (gui *Gui) genericRebaseCommand(command string) error {
|
||||
commandType := strings.Replace(status, "ing", "e", 1)
|
||||
// we should end up with a command like 'git merge --continue'
|
||||
|
||||
sub := gui.OSCommand.PrepareSubProcess("git", commandType, fmt.Sprintf("--%s", command))
|
||||
if sub != nil {
|
||||
gui.SubProcess = sub
|
||||
return gui.Errors.ErrSubProcess
|
||||
// it's impossible for a rebase to require a commit so we'll use a subprocess only if it's a merge
|
||||
if status == "merging" {
|
||||
sub := gui.OSCommand.PrepareSubProcess("git", commandType, fmt.Sprintf("--%s", command))
|
||||
if sub != nil {
|
||||
gui.SubProcess = sub
|
||||
return gui.Errors.ErrSubProcess
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
return gui.OSCommand.RunCommand(fmt.Sprintf("git %s --%s", commandType, command))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user