Merge pull request #2 from jirutka/fix-1

Clone just the specified branch/tag (fixes #1)
This commit is contained in:
Peter Melnichenko 2015-11-18 21:38:54 +03:00
commit 036dc6fe54

View File

@ -117,7 +117,8 @@ def git_clone_command(repo, ref):
if all(c in string.hexdigits for c in ref):
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):
return os.path.join(cache_path, name + version)