git2r icon indicating copy to clipboard operation
git2r copied to clipboard

commits() fails for detached head

Open krlmlr opened this issue 8 years ago • 2 comments

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"’

krlmlr avatar May 10 '16 11:05 krlmlr

Not in the dev version.

krlmlr avatar May 10 '16 11:05 krlmlr

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?

krlmlr avatar May 10 '16 12:05 krlmlr