This might be a useful addition to `clar_libgit2.h` but I haven't looked at it too closely yet.