repos: GitRepo fetch_cmd shouldn't default to "git fetch --all"

The fetch() method for git will call git fetch --all ; this causes
issues when user has multiple remotes. We are able to simply call
'fetch' because by default the origin remote will be used.

From git help fetch:

> When no remote is specified, by default the origin remote will be
used, unless there's an upstream branch configured for the current
branch.

Signed-off-by: Nathan Genetzky <nathan@genetzky.us>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Nathan Genetzky 2020-07-25 13:54:41 -05:00 committed by Jan Kiszka
parent 7068767d27
commit 0e7c32cc79

View File

@ -356,7 +356,7 @@ class GitRepo(RepoImpl):
return ['git', 'cat-file', '-t', self.refspec]
def fetch_cmd(self):
return ['git', 'fetch', '--all']
return ['git', 'fetch']
def is_dirty_cmd(self):
return ['git', 'status', '-s']