Closed pat-s closed 4 years ago
Thanks for the report. This looks like a bug that has to do with the difference between light-weight tags and annotated tags. It does not seem to happen for light-weight tags, only for annotated tags...
Possibly related to https://github.com/r-lib/gert/issues/43
Minimal example:
tmp <- tempfile()
gert::git_clone('https://github.com/krlmlr/fledge', tmp)
gert::git_ahead_behind(ref='v0.0.0.9000', repo = tmp)
gert::git_log(ref='v0.0.0.9000', repo = tmp)
I am facing the same error again in another instance:
library(gert)
#> Linking to libgit2 v1.0.1, ssh support: YES
#> Global config: /Users/pjs/.gitconfig
#> Default user: pat-s <patrick.schratz@gmail.com>
tmp <- tempfile()
gert::git_clone("https://github.com/krlmlr/fledge", tmp)
last_commit <- git_log(repo = tmp)$commit[1]
tag <- git_tag_list("v0.0.3.9007", repo = tmp)$commit
git_ahead_behind(last_commit, tag, repo = tmp)
#> Error in libgit2::git_graph_ahead_behind: object is no commit object
Created on 2020-10-04 by the reprex package (v0.3.0.9001)
Thanks for catching this. I think it's fixed for real now.
Trying to switch from {git2r} to {gert}. Do you know why the following errors?
The {git2r} returns are different than the one from {gert} but passing valid tags should be a valid input for
git_ahead_behind
? Interestingly, not all tags error but only some - however, I do not see a pattern.