1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Don't report errors from within a WithWaitingStatus

We can just return our error to WithWaitingStatus, it will take care of
reporting it.
This commit is contained in:
Stefan Haller
2023-10-08 17:18:37 +02:00
parent c39fafe6ec
commit cc9a20c4ab
2 changed files with 8 additions and 20 deletions

View File

@ -590,24 +590,17 @@ func (self *BranchesController) fastForward(branch *models.Branch) error {
WorktreeGitDir: worktreeGitDir,
},
)
if err != nil {
_ = self.c.Error(err)
}
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
_ = self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
return err
} else {
self.c.LogAction(action)
err := self.c.Git().Sync.FastForward(
task, branch.Name, branch.UpstreamRemote, branch.UpstreamBranch,
)
if err != nil {
_ = self.c.Error(err)
}
_ = self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.BRANCHES}})
return err
}
return nil
})
}