{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/30906","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/30906/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/30906/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/30906/events","html_url":"https://github.com/saltstack/salt/issues/30906","id":131464523,"number":30906,"title":"git.latest does not update origin URL unless there are new commits","user":{"login":"twellspring","id":9868888,"avatar_url":"https://avatars.githubusercontent.com/u/9868888?v=3","gravatar_id":"","url":"https://api.github.com/users/twellspring","html_url":"https://github.com/twellspring","followers_url":"https://api.github.com/users/twellspring/followers","following_url":"https://api.github.com/users/twellspring/following{/other_user}","gists_url":"https://api.github.com/users/twellspring/gists{/gist_id}","starred_url":"https://api.github.com/users/twellspring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twellspring/subscriptions","organizations_url":"https://api.github.com/users/twellspring/orgs","repos_url":"https://api.github.com/users/twellspring/repos","events_url":"https://api.github.com/users/twellspring/events{/privacy}","received_events_url":"https://api.github.com/users/twellspring/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-04T20:26:49Z","updated_at":"2016-02-04T20:27:55Z","closed_at":null,"body":"I switched a repo from bitbucket to github.   The only change in the state was the name line. \r\n```\r\nmy_git_repo:\r\n  git.latest:\r\n    - name: git@github.com:xxxxxx/myrepo.git\r\n    - user: www-data\r\n    - target: /home/www-data/php/myrepo\r\n    - rev: master\r\n    - identity: /home/www-data/.ssh/deployment_key\r\n    - submodules: True\r\n```\r\n\r\nold name line \r\n```\r\n    - name: git@bitbucket.org:xxxxxx/myrepo.git\r\n```\r\n\r\nwhen I ran this state with no new commits on myrepo,  the state showed no changes\r\n\r\n```\r\n          ID: my_git_repo\r\n    Function: git.latest\r\n        Name: git@github.com:xxxxxx/myrepo.git\r\n      Result: True\r\n     Comment:\r\n     Started: 20:15:48.769791\r\n    Duration: 537.615 ms\r\n     Changes:\r\n```\r\nand the .git/config did not get changed\r\n\r\n```\r\n# grep -A 2 '\\[remote' .git/config\r\n[remote \"origin\"]\r\n\turl = git@bitbucket.org:xxxxxx/myrepo.git\r\n\tfetch = +refs/heads/*:refs/remotes/origin/*\r\n```\r\n\r\nBut when there were new commits to apply did the update and also updated .git/config\r\n```\r\n          ID: my_git_repo\r\n    Function: git.latest\r\n        Name: git@github.com:xxxxxx/myrepo.git\r\n      Result: True\r\n     Comment: Repository /home/www-data/php/myrepo updated\r\n     Started: 19:18:44.180815\r\n    Duration: 4012.608 ms\r\n     Changes:\r\n              ----------\r\n              remote/origin:\r\n                  ('git@bitbucket.org:xxxxxx/myrepo.git', 'git@bitbucket.org:xxxxxx/myrepo.git') => git@github.com:xxxxxx/myrepo.git\r\n              remote/origin/master:\r\n                  None => origin\r\n              revision:\r\n                  916fa27040f1c374e680b064cf26f5a50b32a9d6 => 41e132b5d457f4a1195c9772b4f1eb61484c28d4\r\n```\r\n\r\n```\r\n# grep -A 2 '\\[remote' .git/config\r\n[remote \"origin\"]\r\n\turl = git@github.com:xxxxxx/myrepo.git\r\n\tfetch = +refs/heads/*:refs/remotes/origin/*\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/180034793","html_url":"https://github.com/saltstack/salt/issues/30906#issuecomment-180034793","issue_url":"https://api.github.com/repos/saltstack/salt/issues/30906","id":180034793,"user":{"login":"twellspring","id":9868888,"avatar_url":"https://avatars.githubusercontent.com/u/9868888?v=3","gravatar_id":"","url":"https://api.github.com/users/twellspring","html_url":"https://github.com/twellspring","followers_url":"https://api.github.com/users/twellspring/followers","following_url":"https://api.github.com/users/twellspring/following{/other_user}","gists_url":"https://api.github.com/users/twellspring/gists{/gist_id}","starred_url":"https://api.github.com/users/twellspring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twellspring/subscriptions","organizations_url":"https://api.github.com/users/twellspring/orgs","repos_url":"https://api.github.com/users/twellspring/repos","events_url":"https://api.github.com/users/twellspring/events{/privacy}","received_events_url":"https://api.github.com/users/twellspring/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T20:27:55Z","updated_at":"2016-02-04T20:27:55Z","body":"```\r\n# salt --versions-report\r\n           Salt: 2015.5.8\r\n         Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n         Jinja2: 2.7.2\r\n       M2Crypto: 0.21.1\r\n msgpack-python: 0.3.0\r\n   msgpack-pure: Not Installed\r\n       pycrypto: 2.6.1\r\n        libnacl: Not Installed\r\n         PyYAML: 3.10\r\n          ioflo: Not Installed\r\n          PyZMQ: 14.4.0\r\n           RAET: Not Installed\r\n            ZMQ: 4.0.4\r\n           Mako: 0.9.1\r\n        Tornado: 4.2.1\r\n        timelib: Not Installed\r\n       dateutil: 2.4.2\r\n```\r\n"}}