summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2021-01-28 13:41:05 -0600
committerGitHub <noreply@github.com>2021-01-28 20:41:05 +0100
commiteeddaaea52a554f812a841dc14666970169fc778 (patch)
treeba4fb112922b21ca33026cad4900172de8af4664 /lib
parent6ae8d5c380c1f42094b05d38be26b03650aafb39 (diff)
downloadspack-eeddaaea52a554f812a841dc14666970169fc778.tar.gz
spack-eeddaaea52a554f812a841dc14666970169fc778.tar.bz2
spack-eeddaaea52a554f812a841dc14666970169fc778.tar.xz
spack-eeddaaea52a554f812a841dc14666970169fc778.zip
Make git fetching even quieter (for git v1.7.2+)(#21013)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/fetch_strategy.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index b67db24c72..28f1a87c17 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -776,6 +776,12 @@ class GitFetchStrategy(VCSFetchStrategy):
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'):