support for pygit2 0.18.1

But regression on commiting a big file saved by Django as a temporary file on disk.