{"action":"opened","issue":{"url":"https://api.github.com/repos/pantsbuild/pants/issues/1444","labels_url":"https://api.github.com/repos/pantsbuild/pants/issues/1444/labels{/name}","comments_url":"https://api.github.com/repos/pantsbuild/pants/issues/1444/comments","events_url":"https://api.github.com/repos/pantsbuild/pants/issues/1444/events","html_url":"https://github.com/pantsbuild/pants/issues/1444","id":70186806,"number":1444,"title":"git scm server_url origin check is maybe too loose","user":{"login":"areitz","id":1000135,"avatar_url":"https://avatars.githubusercontent.com/u/1000135?v=3","gravatar_id":"","url":"https://api.github.com/users/areitz","html_url":"https://github.com/areitz","followers_url":"https://api.github.com/users/areitz/followers","following_url":"https://api.github.com/users/areitz/following{/other_user}","gists_url":"https://api.github.com/users/areitz/gists{/gist_id}","starred_url":"https://api.github.com/users/areitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/areitz/subscriptions","organizations_url":"https://api.github.com/users/areitz/orgs","repos_url":"https://api.github.com/users/areitz/repos","events_url":"https://api.github.com/users/areitz/events{/privacy}","received_events_url":"https://api.github.com/users/areitz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-22T17:26:00Z","updated_at":"2015-04-22T17:26:00Z","closed_at":null,"body":"We're working on setting up an alternate origin for one of our repos at Twitter, and an engineer decided to name the new origin \"`temp_origin`\":\r\n\r\n```\r\n[areitz@atla-bgy-03-sr3 source_4 ((bcfc917...))]$  git remote -v\r\norigin\thttps://git.twitter.biz/ro/source (fetch)\r\norigin\thttps://git.twitter.biz/ro/source (push)\r\ntemp_origin\thttps://git.twitter.biz/ro/source-ci (fetch)\r\ntemp_origin\thttps://git.twitter.biz/ro/source-ci (push)\r\n```\r\n\r\nHowever, doing so leads to this error when `scm.server_url()` is invoked (where `scm` is an instance of `Git`:\r\n\r\n```\r\nException message: Unable to find origin remote amongst: origin\thttps://git.twitter.biz/ro/source (fetch)\r\norigin\thttps://git.twitter.biz/ro/source (push)\r\ntemp_origin\thttps://git.twitter.biz/ro/source-ci (fetch)\r\ntemp_origin\thttps://git.twitter.biz/ro/source-ci (push)\r\n```\r\n\r\nOur current thinking is that the check for `origin` should be more strict -- maybe something like `/\\borigin\\b`. I plan on coming up with a patch for this later today.\r\n"}}