PR is at https://github.com/libgit2/libgit2sharp/pull/617. Just did what was shown here as I'm not sure of what differences/additions should be made to what I showed.
- @jamill @nulltoken