1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Don't add --version HEAD parameter is already HEAD, some versions of git don't like this.

This commit is contained in:
Michael DeHaan 2013-07-20 11:24:16 -04:00
parent f7dec4f8f4
commit 32d5038d72

View file

@ -108,7 +108,7 @@ def clone(git_path, module, repo, dest, remote, depth, version):
pass
os.chdir(dest_dirname)
cmd = [ git_path, 'clone', '-o', remote, '--recursive' ]
if version:
if version and version != 'HEAD':
cmd.extend([ '--branch', str(version) ])
if depth:
cmd.extend([ '--depth', str(depth) ])