-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
cargo publish doesn't work well with git worktrees #4131
Comments
Could you gist the error message you're seeing? This is probably just bubbling up an error when it should likely be ignoring it. |
With
When I use |
Hm unsure! This may not actually be packaging up anything? Unfortunately nothing leaps to mind as the cause... |
Head's up! We are suffering from the same issue in https://github.com/three-rs/three :( |
Also, I consider this strictly "C-bug" rather than "C-feature-request". First, it's totally confusing what
|
Hah, it turns out our issue was not the subject, sorry! I assumed this originally because the error message is an exact match, and three-rs is the only project I publish that added git submodules. |
I'm not able to reproduce the original worktree issue with the reported versions, but I did find that cargo 1.46 and 1.47 would give an error about "did not expect repo at XYZ to be bare" when run in a worktree. I'm pretty sure the upgrade of git2 in #8778 is what made things work in 1.48. I haven't found any issues with the latest cargo using worktrees or spase checkouts Possible same root cause as #7876 |
Based on @eminence's comment, it sounds like this is no longer reproducible. If people find a way to reproduce this same bug, let us know and we can look into re-opening. |
Re-opened because a good point was made in #7876 that we should get tests added for this. |
@rustbot claim |
It seems that cargo works fine if a worktree hasn't been changed around much, since testing with a brand new worktree worked fine. However, these steps cause problems:
As for why you'd possibly do this: I have a worktree to track the 'previous version branch' of hyper. It started as a worktree of 0.8.x, and eventually its become 0.10.x, and I updated the name of the directory. All git commands work fine, but I cannot
cargo publish
.This works fine with
cargo 0.18.0 (fe7b0cdcf 2017-04-24)
, but fails withcargo 0.20.0-nightly (38ca9b702 2017-05-14)
.The text was updated successfully, but these errors were encountered: