* Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset fails when file with the name 'origin' is present in the repository

* #22455 Integration test for git module to test if it clones a repository with a file named origin

* Fixed yaml errors for test/integration/roles/test_git_clone/tasks/main.yml

* Removed the newly added target git and moved the code to test/integration/targets/git

* Reorganised code structure as per comments

* Fixed playbook name

* Added code that didn't make it to the playbook before.

* No longer need git.yml

* Remove non tasks specific code from tasks file and use existing variables

* Removed msg var from the vars.yml
This commit is contained in:
Miyurz 2017-03-28 18:11:25 +05:30 committed by jctanner
parent ab8578d343
commit 1ea1becf23
3 changed files with 29 additions and 1 deletions

View file

@ -816,7 +816,7 @@ def switch_version(git_path, module, dest, remote, version, verify_commit, depth
if rc != 0:
module.fail_json(msg="Failed to checkout branch %s" % branch,
stdout=out, stderr=err, rc=rc)
cmd = "%s reset --hard %s" % (git_path, remote)
cmd = "%s reset --hard %s --" % (git_path, remote)
else:
# FIXME check for local_branch first, should have been fetched already
if is_remote_branch(git_path, module, dest, remote, version):