diff --git a/git_superproject.py b/git_superproject.py index 3168d9f86..62f2d52fb 100644 --- a/git_superproject.py +++ b/git_superproject.py @@ -26,7 +26,7 @@ import hashlib import os import sys -from git_command import GitCommand +from git_command import git_require, GitCommand from git_refs import R_HEADS _SUPERPROJECT_GIT_NAME = 'superproject.git' @@ -120,6 +120,9 @@ class Superproject(object): print('git fetch missing drectory: %s' % self._work_git, file=sys.stderr) return False + if not git_require((2, 28, 0)): + print('superproject requires a git version 2.28 or later', file=sys.stderr) + return False cmd = ['fetch', url, '--depth', '1', '--force', '--no-tags', '--filter', 'blob:none'] if self._branch: cmd += [self._branch + ':' + self._branch]