1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

simplify fetch

This commit is contained in:
Jesse Duffield
2022-01-06 22:05:18 +11:00
parent 93729ba61b
commit 0d3e5e6a1d
3 changed files with 19 additions and 11 deletions

View File

@ -718,7 +718,7 @@ func (gui *Gui) startBackgroundFetch() {
if !isNew {
time.After(time.Duration(userConfig.Refresher.FetchInterval) * time.Second)
}
err := gui.fetch(false, "")
err := gui.backgroundFetch()
if err != nil && strings.Contains(err.Error(), "exit status 128") && isNew {
_ = gui.ask(askOpts{
title: gui.Tr.NoAutomaticGitFetchTitle,
@ -726,7 +726,7 @@ func (gui *Gui) startBackgroundFetch() {
})
} else {
gui.goEvery(time.Second*time.Duration(userConfig.Refresher.FetchInterval), gui.stopChan, func() error {
err := gui.fetch(false, "")
err := gui.backgroundFetch()
gui.render()
return err
})