Skip to content
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

Expose force=TRUE to git_branch_create() #177

Open
MichaelChirico opened this issue Jun 8, 2022 · 0 comments
Open

Expose force=TRUE to git_branch_create() #177

MichaelChirico opened this issue Jun 8, 2022 · 0 comments

Comments

@MichaelChirico
Copy link

Encountered this error:

gert::git_branch_create(paste(sample(letters), collapse = ""), ref = tag_hash)
# Warning: Your local changes to the following file would be overwritten by checkout: .dev/compare_branches.R
# Use force = TRUE to checkout anyway.
# Error in libgit2::git_checkout_tree : 1 conflict prevents checkout

At a glance here is the triggering line:

bail_if(git_checkout_tree(repo, obj, &opts), "git_checkout_tree");

I am running gert from a copy of a repo in tempdir(), so I don't care much about overwrites; this error message suggests force=TRUE is possible, but not yet exposed to the R API. Is it possible to do so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant