summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source_control/git.py4
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)