1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03: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

@ -170,7 +170,7 @@ func (self *CommitFilesController) onClickMain(opts gocui.ViewMouseBindingOpts)
func (self *CommitFilesController) checkout(node *filetree.CommitFileNode) error {
self.c.LogAction(self.c.Tr.Actions.CheckoutFile)
if err := self.c.Git().WorkingTree.CheckoutFile(self.context().GetRef().RefName(), node.GetPath()); err != nil {
return self.c.Error(err)
return err
}
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
@ -208,7 +208,7 @@ func (self *CommitFilesController) discard(selectedNodes []*filetree.CommitFileN
return nil
})
if err != nil {
return self.c.Error(err)
return err
}
}
@ -294,7 +294,7 @@ func (self *CommitFilesController) toggleForPatch(selectedNodes []*filetree.Comm
return patchOperationFunction(file.Name)
})
if err != nil {
return self.c.Error(err)
return err
}
}