1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

allow fetching remotes with 'f'

This commit is contained in:
Jesse Duffield
2019-12-07 16:20:22 +11:00
parent 033c21754b
commit 3f4613feb0
4 changed files with 33 additions and 0 deletions

View File

@@ -176,3 +176,18 @@ func (gui *Gui) handleEditRemote(g *gocui.Gui, v *gocui.View) error {
})
})
}
func (gui *Gui) handleFetchRemote(g *gocui.Gui, v *gocui.View) error {
remote := gui.getSelectedRemote()
if remote == nil {
return nil
}
return gui.WithWaitingStatus(gui.Tr.SLocalize("FetchingRemoteStatus"), func() error {
if err := gui.GitCommand.FetchRemote(remote.Name); err != nil {
return err
}
return gui.refreshRemotes()
})
}