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

Remove calls to Error()

Now that we have an error handler set, we can simply let them bubble up all the
way to gocui.
This commit is contained in:
Stefan Haller
2024-04-11 21:57:13 +02:00
parent 325800a72e
commit 82a3d33ce3
35 changed files with 158 additions and 168 deletions

View File

@ -101,7 +101,7 @@ func (self *SyncController) push(currentBranch *models.Branch) error {
return self.c.Helpers().Upstream.PromptForUpstreamWithInitialContent(currentBranch, func(upstream string) error {
upstreamRemote, upstreamBranch, err := self.c.Helpers().Upstream.ParseUpstream(upstream)
if err != nil {
return self.c.Error(err)
return err
}
return self.pushAux(currentBranch, pushOpts{
@ -121,7 +121,7 @@ func (self *SyncController) pull(currentBranch *models.Branch) error {
if !currentBranch.IsTrackingRemote() {
return self.c.Helpers().Upstream.PromptForUpstreamWithInitialContent(currentBranch, func(upstream string) error {
if err := self.setCurrentBranchUpstream(upstream); err != nil {
return self.c.Error(err)
return err
}
return self.PullAux(currentBranch, PullFilesOptions{Action: action})