From 6f3f0904eb0b2c4c0a7933d96579cb4dfa4edcfe Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 8 Dec 2014 22:08:50 -0800 Subject: [PATCH] Fix git mod so that we switch to the desired version even if it was previously downloaded --- lib/ansible/modules/source_control/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/source_control/git.py b/lib/ansible/modules/source_control/git.py index 5fcde3ba21..2b0e5dc08d 100644 --- a/lib/ansible/modules/source_control/git.py +++ b/lib/ansible/modules/source_control/git.py @@ -688,8 +688,8 @@ def main(): repo_updated = True # switch to version specified regardless of whether - # we cloned or pulled - if repo_updated and not bare: + # we got new revisions from the repository + if not bare: switch_version(git_path, module, dest, remote, version) # Deal with submodules