From ea2f6b89e9a8d0019fdc3c02ad8562caf99ffcab Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sat, 29 Apr 2017 17:58:52 -0700 Subject: fetch: do full clone of git submodules (fix #3956) (#3958) The required hash of a submodule might point to the non-HEAD commit of the current main branch and hence would lead to a "no such remote ref" at checkout in a shallow submodule. --- lib/spack/spack/fetch_strategy.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 5c872ae1b6..8dd3c2b36b 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -686,20 +686,11 @@ class GitFetchStrategy(VCSFetchStrategy): # Init submodules if the user asked for them. if self.submodules: - # only git 1.8.4 and later have --depth option - if self.git_version < ver('1.8.4'): - if spack.debug: - self.git('submodule', 'update', '--init', '--recursive') - else: - self.git('submodule', '--quiet', 'update', '--init', - '--recursive') + if spack.debug: + self.git('submodule', 'update', '--init', '--recursive') else: - if spack.debug: - self.git('submodule', 'update', '--init', '--recursive', - '--depth=1') - else: - self.git('submodule', '--quiet', 'update', '--init', - '--recursive', '--depth=1') + self.git('submodule', '--quiet', 'update', '--init', + '--recursive') def archive(self, destination): super(GitFetchStrategy, self).archive(destination, exclude='.git') -- cgit v1.2.3-60-g2f50