From 10ac8ba3deefcb26f922a019be3d563997726c2c Mon Sep 17 00:00:00 2001
From: Michael DeHaan <michael@ansibleworks.com>
Date: Sat, 20 Jul 2013 11:24:16 -0400
Subject: [PATCH] Don't add --version HEAD parameter is already HEAD, some
 versions of git don't like this.

---
 source_control/git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source_control/git b/source_control/git
index b2101fe950f..a7417bf6934 100644
--- a/source_control/git
+++ b/source_control/git
@@ -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) ])