diff options
author | Jan Duzinkiewicz <jduzinkiewicz@gmail.com> | 2014-12-23 20:12:42 +0100 |
---|---|---|
committer | Toshio Kuratomi <toshio@fedoraproject.org> | 2016-01-11 17:09:51 -0800 |
commit | b77bf7a9aa1889fbee75f3db17c89816ca7c7838 (patch) | |
tree | 8042a7f415708f246ede67459289337d19cb8a62 /source_control/git.py | |
parent | d0180f23289678b0cc36f02dfc9a72972527ffe7 (diff) | |
download | ansible-modules-core-b77bf7a9aa1889fbee75f3db17c89816ca7c7838.tar.gz |
forcing git fetch if sha1 are equal between repos but branch exists only at remote
Add an explanatory comment to the code
Diffstat (limited to 'source_control/git.py')
-rw-r--r-- | source_control/git.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source_control/git.py b/source_control/git.py index e4e3f394..2d3d1542 100644 --- a/source_control/git.py +++ b/source_control/git.py @@ -762,7 +762,9 @@ def main(): if version in get_tags(git_path, module, dest): repo_updated = False else: - repo_updated = False + # if the remote is a branch and we have the branch locally, exit early + if version in get_branches(git_path, module, dest): + repo_updated = False if repo_updated is None: if module.check_mode: module.exit_json(changed=True, before=before, after=remote_head) |