Revert "Rolled back to an API of rugged's libgit2 version."

This reverts commit 590c0c2e62443a2aa11c0769af80ca89c31932f7.