git2r
git2r copied to clipboard
commits() fails for detached head
git checkout HEAD~0
Rscript -e "git2r::commits()"
# Error in (function (classes, fdef, mtable) :
# unable to find an inherited method for function ‘branch_target’ for signature ‘"git_commit"’
Not in the dev version.
Sorry: I can reproduce in both dev and released versions, but only for a specific repo:
git clone --depth=50 --branch=feature/dtplyr2 https://github.com/krlmlr/dplyr.git krlmlr/dplyr
git checkout -qf b504e90e86619a6b0178821afbd7343059c21595
Rscript -e "git2r::commits()"
Tried a few different settings (other repo, other branch, ...). Could the slash in the branch name trigger this behavior?