repos: git fetch always with quiet flag

git-fetch prints its progress on stderr which makes harmless progress
output be rendered like ERRORs. Messages we likely do not care about and
certainly do not want to see as errors.
This gets us consistent with most of the other git operations using -q.

Closes: #78
Signed-off-by: Henning Schild <henning.schild@siemens.com>
[Jan: style fix]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Henning Schild 2022-02-25 16:13:18 +01:00 committed by Jan Kiszka
parent 32514c8f4f
commit 16a697736c

View File

@ -362,9 +362,9 @@ class GitRepo(RepoImpl):
return ['git', 'cat-file', '-t', self.remove_ref_prefix(self.refspec)]
def fetch_cmd(self):
cmd = ['git', 'fetch']
cmd = ['git', 'fetch', '-q']
if self.refspec.startswith('refs/'):
cmd.extend(['--quiet', 'origin',
cmd.extend(['origin',
'+' + self.refspec
+ ':refs/remotes/origin/'
+ self.remove_ref_prefix(self.refspec)])