libgit2/libgit2 — pull request #1061 by nulltoken (2012-11-11 22:41:45+00:00)
Title: repository: Refine repository_head() error report

Make `git repository_head()` return different error codes:
- when `HEAD` is missing -> `ENOTFOUND`
- when `HEAD` (in)directly points to a missing branch -> `EORPHANEDHEAD`

This should help making GHfW even more awesomer :-)

cf. this **[thread](https://github.com/libgit2/libgit2sharp/issues/189#issuecomment-9758896)** for more information on the subject