From 8e5e5108d1303247d4087ccb5e8fdba16e64b5e1 Mon Sep 17 00:00:00 2001 From: Robin Roth Date: Tue, 19 Apr 2016 12:17:00 +0200 Subject: [PATCH] with depth only fetch actual version * don't use refs/heads/branchname for branches * for tags it's needed thou * fixes #3456 --- lib/ansible/modules/source_control/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/source_control/git.py b/lib/ansible/modules/source_control/git.py index 1230b187477..1df1fc1aa0c 100644 --- a/lib/ansible/modules/source_control/git.py +++ b/lib/ansible/modules/source_control/git.py @@ -522,7 +522,7 @@ def fetch(git_path, module, repo, dest, version, remote, depth, bare, refspec): elif version == 'HEAD': refspecs.append('HEAD') elif is_remote_branch(git_path, module, dest, repo, version): - refspecs.append('+refs/heads/'+version+':refs/heads/'+version) + refspecs.append(version) elif is_remote_tag(git_path, module, dest, repo, version): refspecs.append('+refs/tags/'+version+':refs/tags/'+version) if refspecs: