diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-30 10:50:50 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-17 19:13:40 +1100 |
commit | 55b393c9292aa5277595c056b166d1efe305d02b (patch) | |
tree | 3a5d3052de9994d98af9925976b564769c33c936 | |
parent | f0c81ea6dc420786ec58b0f1402d7696e221999d (diff) |
always fast forward
-rw-r--r-- | pkg/gui/branches_panel.go | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index 4941f32ed..95a754030 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -8,7 +8,6 @@ import ( "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/context" - "github.com/jesseduffield/lazygit/pkg/gui/controllers" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/utils" ) @@ -307,16 +306,12 @@ func (gui *Gui) handleFastForward() error { ) return gui.c.WithLoaderPanel(message, func() error { - if gui.State.Panels.Branches.SelectedLineIdx == 0 { - _ = gui.Controllers.Sync.PullAux(controllers.PullFilesOptions{Action: action, FastForwardOnly: true}) - } else { - gui.c.LogAction(action) - err := gui.git.Sync.FastForward(branch.Name, branch.UpstreamRemote, branch.UpstreamBranch) - if err != nil { - _ = gui.c.Error(err) - } - _ = gui.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.BRANCHES}}) + gui.c.LogAction(action) + err := gui.git.Sync.FastForward(branch.Name, branch.UpstreamRemote, branch.UpstreamBranch) + if err != nil { + _ = gui.c.Error(err) } + _ = gui.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.BRANCHES}}) return nil }) |