libgit2/libgit2 — pull request #1559 by carlosmn (2013-05-08 00:31:36+00:00)
Title: Introduce git_reference_shorthand

Generate a shorthand name out of the full refname.

---

I'm sure the name can be made better, maybe `_short_name`?

Current git's representation of remote-tracking branches is currently split between the old way of including `remotes/` which `gitk` and `name-rev` show, and `branch` and `log` not including it. I went with the latter as it's the newer one and how one talks about remote-tracking branches anyway.