mirror of https://github.com/ansible/ansible.git
Add check mode to git module
Related to issue #2114. This hooks in check_mode to git module. This will exit with changed=True at the following places: * If the repo has not been cloned * If the destination has local modifications, this will exit with changed=True. This is because reset() will exit anyways if there are local mods and force is False. * If the remote HEAD commit id is not the same as that of the local HEAD. This is determined by get_remote_head() that runs 'git ls-remote' to determine remote HEAD. Lastly, if this is run with check_mode enabled, this will exit with changed=False before fetch() is invoked so that no local mods are made.reviewable/pr18780/r1
parent
610043a2be
commit
3d1b67d1b3
Loading…
Reference in New Issue