Add --all to "git fetch" command when not fetching a specific remote

This commit is contained in:
Stefan Haller 2023-03-01 09:09:35 +01:00
parent 697157f5d5
commit 31a2ea1f19
4 changed files with 37 additions and 8 deletions

View file

@ -54,7 +54,9 @@ type FetchOptions struct {
// Fetch fetch git repo
func (self *SyncCommands) FetchCmdObj(opts FetchOptions) oscommands.ICmdObj {
cmdArgs := NewGitCmd("fetch").ToArgv()
cmdArgs := NewGitCmd("fetch").
ArgIf(self.UserConfig.Git.FetchAll, "--all").
ToArgv()
cmdObj := self.cmd.New(cmdArgs)
if opts.Background {