Revert pull request #1997
Merge pull request #2165 from libgit2/revert-1997

Revert pull request #1997