{"action":"created","issue":{"url":"https://api.github.com/repos/tonchis/vim-to-github/issues/11","labels_url":"https://api.github.com/repos/tonchis/vim-to-github/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/tonchis/vim-to-github/issues/11/comments","events_url":"https://api.github.com/repos/tonchis/vim-to-github/issues/11/events","html_url":"https://github.com/tonchis/vim-to-github/pull/11","id":60754550,"number":11,"title":"Use rev-parse to get HEAD.","user":{"login":"shioyama","id":561827,"avatar_url":"https://avatars.githubusercontent.com/u/561827?v=3","gravatar_id":"","url":"https://api.github.com/users/shioyama","html_url":"https://github.com/shioyama","followers_url":"https://api.github.com/users/shioyama/followers","following_url":"https://api.github.com/users/shioyama/following{/other_user}","gists_url":"https://api.github.com/users/shioyama/gists{/gist_id}","starred_url":"https://api.github.com/users/shioyama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shioyama/subscriptions","organizations_url":"https://api.github.com/users/shioyama/orgs","repos_url":"https://api.github.com/users/shioyama/repos","events_url":"https://api.github.com/users/shioyama/events{/privacy}","received_events_url":"https://api.github.com/users/shioyama/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-12T00:49:11Z","updated_at":"2015-03-13T23:01:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tonchis/vim-to-github/pulls/11","html_url":"https://github.com/tonchis/vim-to-github/pull/11","diff_url":"https://github.com/tonchis/vim-to-github/pull/11.diff","patch_url":"https://github.com/tonchis/vim-to-github/pull/11.patch"},"body":"`git show-ref` seems to use the origin's HEAD rather than the local one. `git rev-parse HEAD` consistently gives the local head."},"comment":{"url":"https://api.github.com/repos/tonchis/vim-to-github/issues/comments/79517059","html_url":"https://github.com/tonchis/vim-to-github/pull/11#issuecomment-79517059","issue_url":"https://api.github.com/repos/tonchis/vim-to-github/issues/11","id":79517059,"user":{"login":"tonchis","id":106882,"avatar_url":"https://avatars.githubusercontent.com/u/106882?v=3","gravatar_id":"","url":"https://api.github.com/users/tonchis","html_url":"https://github.com/tonchis","followers_url":"https://api.github.com/users/tonchis/followers","following_url":"https://api.github.com/users/tonchis/following{/other_user}","gists_url":"https://api.github.com/users/tonchis/gists{/gist_id}","starred_url":"https://api.github.com/users/tonchis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonchis/subscriptions","organizations_url":"https://api.github.com/users/tonchis/orgs","repos_url":"https://api.github.com/users/tonchis/repos","events_url":"https://api.github.com/users/tonchis/events{/privacy}","received_events_url":"https://api.github.com/users/tonchis/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T23:01:13Z","updated_at":"2015-03-13T23:01:13Z","body":"@shioyama I've been thinking about this. The problem you're experiencing comes from #10, which I think is a step forward because linking to commits it's much more useful than linking to branches (in the latest remote commit).\r\n\r\nWith this in mind I think that if `:ToGithub` gives you a link to a commit but you haven't pushed yet, it's ok to see a 404, because the commit exists, but GitHub doesn't know about it yet.\r\n\r\nI also prefer this over trying to be smart about which commit should we select (depending on what's pushed, which branch is HEAD on, etc). It's simpler and a 404 explains itself.\r\n\r\nI will add a \"Caveats\" section in the README to warn about it in this PR and then merge.\r\n\r\nThank you for spotting this :)"}}