ropensci / git2r

R bindings to the libgit2 library
https://docs.ropensci.org/git2r
GNU General Public License v2.0
215 stars 58 forks source link

commits() fails for detached head #233

Open krlmlr opened 8 years ago

krlmlr commented 8 years ago
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 commented 8 years ago

Not in the dev version.

krlmlr commented 8 years ago

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?