libgit2/git2go — pull request #9 by carlosmn (2013-03-08 15:08:09+00:00)
Title: Oid: make sure not to dereference a NULL git_oid

Some calls like Reference.Target() can return NULL if the reference is
symbolic. Make sure newOidFromC() can handle these situations.

---

I couldn't decide whether we should return nil or a zeroed Oid in this case. A zeroed id won't make you segfault, but it could lead to the code assuming it has a proper id. Thoughts?