diff options
author | Christoph Junghans <christoph.junghans@gmail.com> | 2017-04-29 17:58:52 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-04-29 17:58:52 -0700 |
commit | ea2f6b89e9a8d0019fdc3c02ad8562caf99ffcab (patch) | |
tree | 9e3bbea16ddee2b6ffcac7552d473f2847cf6799 /lib/spack | |
parent | ce3ab503ded78d19aae45a938084d1f8670cc625 (diff) | |
download | spack-ea2f6b89e9a8d0019fdc3c02ad8562caf99ffcab.tar.gz spack-ea2f6b89e9a8d0019fdc3c02ad8562caf99ffcab.tar.bz2 spack-ea2f6b89e9a8d0019fdc3c02ad8562caf99ffcab.tar.xz spack-ea2f6b89e9a8d0019fdc3c02ad8562caf99ffcab.zip |
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.
Diffstat (limited to 'lib/spack')
-rw-r--r-- | lib/spack/spack/fetch_strategy.py | 17 |
1 files 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') |