Make git fetching even quieter (for git v1.7.2+)(#21013)

This commit is contained in:
Adam J. Stewart 2021-01-28 13:41:05 -06:00 committed by GitHub
parent 6ae8d5c380
commit eeddaaea52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -776,6 +776,12 @@ def git(self):
if not self._git:
self._git = which('git', required=True)
# Disable advice for a quieter fetch
# https://github.com/git/git/blob/master/Documentation/RelNotes/1.7.2.txt
if self.git_version >= Version('1.7.2'):
self._git.add_default_arg('-c')
self._git.add_default_arg('advice.detachedHead=false')
# If the user asked for insecure fetching, make that work
# with git as well.
if not spack.config.get('config:verify_ssl'):