I forgot to mention that there is not parity between the `entrycount` and `get_byindex` functions in libgit2.  I think that we have some debt here on the libgit2 side (phkelley opened an issue about this in general, not these functions in particular) but this matches the current signatures, for better or worse.