defunkt/hub — pull request #117 by maxim (2011-12-11 07:54:09+00:00)
Title: Branch names with slashes confuse hub browse

I added a breaking test trying to use `browse` with a branch called `feature/foo`. I see that the bug may be related to the way `Branch#short_name` is implemented.

```ruby
def short_name
name.split('/').last
end
```

It seems, that `name.split('\').last` isn't sufficient for obtaining current branch name. I'm not sure what would be the right way to do it though. Perhaps, `sub`-out `/^refs\/(?:heads|remotes|tags)\//` from the ref path? Thoughts?