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:13:56 -0800 |
commit | c9735fddd871ef2cbf82ebae78fc61718905aeec (patch) | |
tree | 987e8777dd2506ebcf2b2160267a3879ae8e8ee7 | |
parent | 1924d7dd03a5fe5802a771a2b3f473ab319ec125 (diff) | |
download | ansible-modules-core-stable-2.0.1.tar.gz |
forcing git fetch if sha1 are equal between repos but branch exists only at remotestable-2.0.1
Add an explanatory comment to the code
-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 bdc87b03..e4f7f28a 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) |