mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Use an interface for tasks instead of a concrete struct
By using an interface for tasks we can use a fake implementation in tests with extra methods
This commit is contained in:
@ -198,7 +198,7 @@ func (self *RemotesController) edit(remote *models.Remote) error {
|
||||
}
|
||||
|
||||
func (self *RemotesController) fetch(remote *models.Remote) error {
|
||||
return self.c.WithWaitingStatus(self.c.Tr.FetchingRemoteStatus, func(task *gocui.Task) error {
|
||||
return self.c.WithWaitingStatus(self.c.Tr.FetchingRemoteStatus, func(task gocui.Task) error {
|
||||
err := self.c.Git().Sync.FetchRemote(task, remote.Name)
|
||||
if err != nil {
|
||||
_ = self.c.Error(err)
|
||||
|
Reference in New Issue
Block a user