{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1573","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1573/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1573/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1573/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/1573","id":90085602,"number":1573,"title":"Git module should reset a repo if repo parameter is different","user":{"login":"lekum","id":2630720,"avatar_url":"https://avatars.githubusercontent.com/u/2630720?v=3","gravatar_id":"","url":"https://api.github.com/users/lekum","html_url":"https://github.com/lekum","followers_url":"https://api.github.com/users/lekum/followers","following_url":"https://api.github.com/users/lekum/following{/other_user}","gists_url":"https://api.github.com/users/lekum/gists{/gist_id}","starred_url":"https://api.github.com/users/lekum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lekum/subscriptions","organizations_url":"https://api.github.com/users/lekum/orgs","repos_url":"https://api.github.com/users/lekum/repos","events_url":"https://api.github.com/users/lekum/events{/privacy}","received_events_url":"https://api.github.com/users/lekum/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/feature_idea","name":"feature_idea","color":"006b75"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/P3","name":"P3","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-22T12:30:00Z","updated_at":"2015-06-26T21:42:17Z","closed_at":null,"body":"Ansible Version: 1.9.1\r\n\r\nWhen using the ansible `git` module, if a previous git repository exists in the `dest` folder, the module does not reset the folder content to the new `repo` HEAD. Instead, it returns as if the folder has not been updated at all:\r\n\r\n```\r\nansible -m git -a \"repo=url_of_new_remote.git dest=/path/to/previous/repo\" host\r\nhost | success >> {\r\n    \"after\": \"81afeec04ca192702547eb010e30dbda8ebdbcfd\", \r\n    \"before\": \"81afeec04ca192702547eb010e30dbda8ebdbcfd\", \r\n    \"changed\": false\r\n}\r\n```\r\nThat means that with the git module we cannot modify the remote of the Git repo.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/115897716","html_url":"https://github.com/ansible/ansible-modules-core/issues/1573#issuecomment-115897716","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1573","id":115897716,"user":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T21:42:17Z","updated_at":"2015-06-26T21:42:17Z","body":"probably should fail normally and only do this with a force=yes"}}