{"action":"created","issue":{"url":"https://api.github.com/repos/github/hub/issues/768","labels_url":"https://api.github.com/repos/github/hub/issues/768/labels{/name}","comments_url":"https://api.github.com/repos/github/hub/issues/768/comments","events_url":"https://api.github.com/repos/github/hub/issues/768/events","html_url":"https://github.com/github/hub/issues/768","id":54789435,"number":768,"title":"The \"hub co\" for pull request on renamed repo fails","user":{"login":"aik099","id":1277526,"avatar_url":"https://avatars.githubusercontent.com/u/1277526?v=3","gravatar_id":"","url":"https://api.github.com/users/aik099","html_url":"https://github.com/aik099","followers_url":"https://api.github.com/users/aik099/followers","following_url":"https://api.github.com/users/aik099/following{/other_user}","gists_url":"https://api.github.com/users/aik099/gists{/gist_id}","starred_url":"https://api.github.com/users/aik099/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik099/subscriptions","organizations_url":"https://api.github.com/users/aik099/orgs","repos_url":"https://api.github.com/users/aik099/repos","events_url":"https://api.github.com/users/aik099/events{/privacy}","received_events_url":"https://api.github.com/users/aik099/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-19T17:13:52Z","updated_at":"2015-01-19T17:15:48Z","closed_at":null,"body":"There 2 repos:\r\n* https://github.com/Behat/docs\r\n* https://github.com/minkphp/docs\r\n\r\nIf you try to fork both of them into same account you run into naming conflict and are forced to fork either of repos under different name.\r\n\r\nFor example try:\r\n\r\n1. clone https://github.com/minkphp/docs repo\r\n2. do `hub co https://github.com/minkphp/docs/pull/45`\r\n\r\nIt fails with this error:\r\n```\r\nfatal: Couldn't find remote ref refs/heads/session\r\nerror: Could not fetch stof\r\n```\r\nThis is because attempt is made to to read `docs/session` ref from `Behat/docs` fork.\r\n\r\nI think that we shouldn't blindly assume that every forked repo is named the same and use GitHub API for detecting actual fork name for every user."},"comment":{"url":"https://api.github.com/repos/github/hub/issues/comments/70528765","html_url":"https://github.com/github/hub/issues/768#issuecomment-70528765","issue_url":"https://api.github.com/repos/github/hub/issues/768","id":70528765,"user":{"login":"aik099","id":1277526,"avatar_url":"https://avatars.githubusercontent.com/u/1277526?v=3","gravatar_id":"","url":"https://api.github.com/users/aik099","html_url":"https://github.com/aik099","followers_url":"https://api.github.com/users/aik099/followers","following_url":"https://api.github.com/users/aik099/following{/other_user}","gists_url":"https://api.github.com/users/aik099/gists{/gist_id}","starred_url":"https://api.github.com/users/aik099/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik099/subscriptions","organizations_url":"https://api.github.com/users/aik099/orgs","repos_url":"https://api.github.com/users/aik099/repos","events_url":"https://api.github.com/users/aik099/events{/privacy}","received_events_url":"https://api.github.com/users/aik099/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T17:15:48Z","updated_at":"2015-01-19T17:15:48Z","body":"Currently I was able to mediate that problem by editing path to a remote after the error was shown and then repeating the command."}}