https://github.com/libgit2/libgit2/commit/1d461f440debd2e1636db4d8cf105a8cccaab7d3