-
Notifications
You must be signed in to change notification settings - Fork 148
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
Clean updating the crates.io index sets 'refs/remotes/origin/' to HEAD insted of master #411
Comments
Thanks for the report. Hmm, this is strange, I can't reproduce the issue. Have you tried removing the index and rebuilding it with
|
Updating the index is done here: Lines 126 to 159 in 034f6ef
|
Did indeed fail on cargo check as well. Thow I narrowed down the issue. This works as intended on Stable, but not on nightly.
Might be connected to rust-lang/cargo#8364 |
I'm facing same issue on
can I revert back |
@kavirajk no. Temporarly solution is to rename the file in |
Have thought about some fixes. One would be to allow |
+1, Same problem with OP, hope for the new version |
Fixes killercup#411 TODO: Is it ok if we take the first one we find. Are there any examples of having more than one file in 'refs/remotes/origin/'?.
How about this problem i missed here: |
I am getting a similar error: |
I notice that others are posting that this error has reappeared. I'd be happy to open a new issue if that's useful but thought it might be useful to add the details of the error I see here and specific versions:
It works on rust I have a scripted update of rust + crates for gitopolis which you can find here: https://github.com/rustworkshop/gitopolis/blob/main/upgrades.sh I've been running it fairly regularly, and the last rust upgrade worked fine (rust update, cargo update done with cargo-edit) I've just run it again this evening, and it's upgraded rust to 1.77.1, and then the
Looking at the referenced git folder, it appears to have no heads at all, which would explain the error, though I don't know why it would be in that state
I don't know what this repo/folder is for, I don't know much about the innards of asdf, rust and cargo. The same folder in the v1.77.0 install has HEAD and master:
Hope that's in some way helpful to someone |
Running any
cargo add {crate}
would fail with:After some debugging i found that the cargo index had its 'refs/remotes/origin' set to
HEAD
instead ofmaster
. I tried rebuilding the index by runningrm -rf ~/.cargo/registry/index/github.com-*/
and thencargo add <any dependency>
. This updated the index, however nowrefs/remotes/origin/
still containsHEAD
insted ofmaster
.Found the line in that failed in this lib to be:
cargo-edit/src/fetch.rs
Line 271 in 034f6ef
Confirmed that running
mv HEAD master
temporarily fixed the problem.The text was updated successfully, but these errors were encountered: