-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Passing checkout_branch to pygit2.clone_repository() triggers a fatal error #399
Comments
Which error? Which is the active branch in the source repository? |
The active branch is
And this is the full error I get:
|
I've just discovered that the "test_clone_checkout_branch" test in the repository test suite is commented out because it's broken, which probably explains why this use case isn't working for me. I feel like the documentation should be updated to reflect this until it is fixed, as it can be quite frustrating for someone who doesn't know. |
The test is commented out for a different reason, explained in the comment block. As you can see from the error message, the issue here is down to a type mismatch, which looks like a missing |
We were missing a cast to bytes. Add a test for this option as well and remove the old commented-out test for checkout_branch, which is superseded by this one and whose last bit seemed confused about what the option means. This fixes libgit2#399
Whenever I try and clone any repository with something like the following command:
The entire contents of the repo are staged for deletion.
I tried to get around this by passing 'checkout_branch="master"' to the clone_repository() function (as this fixes the issue just fine when I run 'git checkout master' from my shell), but that triggers a fatal error.
The text was updated successfully, but these errors were encountered: