The lifetime for index entries is... less than ideal: https://github.com/libgit2/libgit2/issues/1576