summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/fetch_strategy.py2
-rw-r--r--lib/spack/spack/test/packages.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 38b837b659..f5425d6bbd 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -596,7 +596,7 @@ class GitFetchStrategy(VCSFetchStrategy):
"""
enabled = True
url_attr = 'git'
- optional_attrs = ['tag', 'branch', 'commit']
+ optional_attrs = ['tag', 'branch', 'commit', 'submodules']
def __init__(self, **kwargs):
# Discards the keywords in kwargs that may conflict with the next call
diff --git a/lib/spack/spack/test/packages.py b/lib/spack/spack/test/packages.py
index 464e37a8d2..296a263479 100644
--- a/lib/spack/spack/test/packages.py
+++ b/lib/spack/spack/test/packages.py
@@ -341,6 +341,13 @@ def test_git_url_top_level_git_versions(mock_packages, config):
assert fetcher.commit == 'abc34'
assert fetcher.branch is None
+ fetcher = spack.fetch_strategy.for_package_version(pkg, 'submodules')
+ assert isinstance(fetcher, spack.fetch_strategy.GitFetchStrategy)
+ assert fetcher.url == 'https://example.com/some/git/repo'
+ assert fetcher.tag is None
+ assert fetcher.commit is None
+ assert fetcher.branch is None
+
fetcher = spack.fetch_strategy.for_package_version(pkg, 'develop')
assert isinstance(fetcher, spack.fetch_strategy.GitFetchStrategy)
assert fetcher.url == 'https://example.com/some/git/repo'