Clone just the specified branch/tag (fixes #1)

This commit is contained in:
Jakub Jirutka 2015-11-18 19:04:09 +01:00
parent 90104f8c3c
commit ffa9226b2e

View File

@ -117,7 +117,8 @@ def git_clone_command(repo, ref):
if all(c in string.hexdigits for c in ref): if all(c in string.hexdigits for c in ref):
return "git clone" return "git clone"
return "git clone --depth=1" # --branch works even for tags
return "git clone --depth=1 --branch=%s" % (ref or 'master')
def cached_archive_name(name, version): def cached_archive_name(name, version):
return os.path.join(cache_path, name + version) return os.path.join(cache_path, name + version)