mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-25 12:24:47 +02:00
always fast forward
This commit is contained in:
parent
f0c81ea6dc
commit
55b393c929
@ -8,7 +8,6 @@ import (
|
|||||||
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
|
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
|
||||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
"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/gui/types"
|
||||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||||
)
|
)
|
||||||
@ -307,16 +306,12 @@ func (gui *Gui) handleFastForward() error {
|
|||||||
)
|
)
|
||||||
|
|
||||||
return gui.c.WithLoaderPanel(message, func() 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)
|
gui.c.LogAction(action)
|
||||||
err := gui.git.Sync.FastForward(branch.Name, branch.UpstreamRemote, branch.UpstreamBranch)
|
err := gui.git.Sync.FastForward(branch.Name, branch.UpstreamRemote, branch.UpstreamBranch)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = gui.c.Error(err)
|
_ = gui.c.Error(err)
|
||||||
}
|
}
|
||||||
_ = gui.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.BRANCHES}})
|
_ = gui.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.BRANCHES}})
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user