This PR addresses https://github.com/r-lib/gert/issues/211. git_index_new, which was being used when git_ls had a ref, is not in the current version of libgit2 (only until v1.6.5) so we get the index via git_repository_index.
I have also added the test contained in the issue.
This PR addresses https://github.com/r-lib/gert/issues/211.
git_index_new
, which was being used whengit_ls
had a ref, is not in the current version of libgit2 (only until v1.6.5) so we get the index viagit_repository_index
.I have also added the test contained in the issue.