diff options
Diffstat (limited to 'git_superproject.py')
-rw-r--r-- | git_superproject.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git_superproject.py b/git_superproject.py index 3168d9f8..62f2d52f 100644 --- a/git_superproject.py +++ b/git_superproject.py | |||
@@ -26,7 +26,7 @@ import hashlib | |||
26 | import os | 26 | import os |
27 | import sys | 27 | import sys |
28 | 28 | ||
29 | from git_command import GitCommand | 29 | from git_command import git_require, GitCommand |
30 | from git_refs import R_HEADS | 30 | from git_refs import R_HEADS |
31 | 31 | ||
32 | _SUPERPROJECT_GIT_NAME = 'superproject.git' | 32 | _SUPERPROJECT_GIT_NAME = 'superproject.git' |
@@ -120,6 +120,9 @@ class Superproject(object): | |||
120 | print('git fetch missing drectory: %s' % self._work_git, | 120 | print('git fetch missing drectory: %s' % self._work_git, |
121 | file=sys.stderr) | 121 | file=sys.stderr) |
122 | return False | 122 | return False |
123 | if not git_require((2, 28, 0)): | ||
124 | print('superproject requires a git version 2.28 or later', file=sys.stderr) | ||
125 | return False | ||
123 | cmd = ['fetch', url, '--depth', '1', '--force', '--no-tags', '--filter', 'blob:none'] | 126 | cmd = ['fetch', url, '--depth', '1', '--force', '--no-tags', '--filter', 'blob:none'] |
124 | if self._branch: | 127 | if self._branch: |
125 | cmd += [self._branch + ':' + self._branch] | 128 | cmd += [self._branch + ':' + self._branch] |