libgit2/pygit2 — pull request #335 by carlosmn (2014-02-04 11:55:46+00:00)
Title: Borrow C strings instead of copying them

Often, we don't need our own copy of a C string as we're simply going to pass it to libgit2 and then free it. In those cases, we can skip the `strdup` and use the underlying C string and use the refcount to make sure we have a valid pointer.

It also fixes a leak in the `IndexEntry` code.