defunkt/hub — Issue #118: `hub checkout` with pull request URL picking up wrong label
Author: dpiddy
Created: 2011-12-11 13:42:15+00:00
State: open

Trying to use `hub checkout https://github.com/geemus/excon/pull/87` results in me being in a branch named `geemus-master` which is unexpected. Looks like [this](https://github.com/defunkt/hub/blob/539b4c52dd418cf255559828c91f9a8b1de76cb5/lib/hub/commands.rb#L313) picks up the base label instead of the head label.

Have you considered bundling [okjson](https://github.com/kr/okjson) or similar to avoid trying to find things in returned JSON with `match` and such?