New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release() with detached Git head doesn't throw error #1136

Merged
merged 2 commits into from Mar 28, 2016

Conversation

Projects
None yet
3 participants
@krlmlr
Member

krlmlr commented Mar 27, 2016

@stewid: Can this be done better? I have found is_commit(), but not is_branch().

@stewid

This comment has been minimized.

stewid commented Mar 27, 2016

@krlmlr Looks fine 👍 . I have added the is_branch method to git2r ropensci/git2r@a5e65c3

I suggest that you add n = 1 in c1 <- git2r::commits(r, n = 1)[[1]]
https://github.com/krlmlr/devtools/blob/feature/git-detached/R/git.R#L32 to avoid listing all commits

@krlmlr

This comment has been minimized.

Member

krlmlr commented Mar 28, 2016

Thanks. The code is now using branch_target(), looks like this is the most accurate solution (equivalent to commits(r, n = 1, time = FALSE, topological = FALSE)).

@hadley hadley merged commit bd52c94 into r-lib:master Mar 28, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hadley

This comment has been minimized.

Member

hadley commented Mar 28, 2016

Thanks! Do you have any thoughts on #1128?

@krlmlr krlmlr deleted the krlmlr:feature/git-detached branch Mar 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment