Port to new libgit2 api