From dcd556b92f97ae7b14f7a6d179bb59b379a14163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Wir=C3=A9n?= Date: Thu, 22 Aug 2013 22:05:37 +0200 Subject: [PATCH] Fixed so that we no longer check with the remote if a checkout already is at the desired sha version. --- library/source_control/git | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/source_control/git b/library/source_control/git index eeabd2fefa..897ecc5649 100644 --- a/library/source_control/git +++ b/library/source_control/git @@ -334,6 +334,10 @@ def main(): (rc, out, err) = reset(git_path, module, dest, force) if rc != 0: module.fail_json(msg=err) + # exit if already at desired sha version + # abbreviate version in case full sha is given + if before == str(version)[:7]: + module.exit_json(changed=False) # check or get changes from remote remote_head = get_remote_head(git_path, module, dest, version, remote) if module.check_mode: