Updated API usage.

https://github.com/libgit2/libgit2/compare/06d772d...5d91bea