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

Add branch and tag to git_install() #255

Closed
rkrug opened this Issue Feb 18, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@rkrug

rkrug commented Feb 18, 2013

I would suggest to add a ref argument to the function install_git(), similar to the one in the install_github() to enable the installation of tagged versions or branches from a git repository.

As pointed out by Winston Chang (Conversation "ref parameter for install_git?" on the devtools mailing list), -b (or --branch) could used in git clone:

At the moment install_git_single uses

request <- system2(
    git_binary_path,
    args = c('clone', '--depth', '1', '--no-hardlinks', git_url,  bundle),
    stdout = FALSE, stderr = FALSE
  )

to clone the git repo.

request <- system2(
    git_binary_path,
    args = c('clone', '--branch = \"', ref, '\" ', '--depth', '1', '--no-hardlinks', git_url,  bundle),
    stdout = FALSE, stderr = FALSE
  )

i.e. adding the --branch = ... parameter, should work as expected.

Cheers,

Rainer

@hadley hadley closed this in f134e4e Mar 28, 2013

@lock lock bot locked and limited conversation to collaborators Sep 19, 2018

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