Running any cargo add {crate} would fail with:
Command failed due to unhandled error: reference 'refs/remotes/origin/master' not found; class=Reference (4); code=NotFound (-3)
After some debugging i found that the cargo index had its 'refs/remotes/origin' set to HEAD instead of master. I tried rebuilding the index by running rm -rf ~/.cargo/registry/index/github.com-*/ and then cargo add <any dependency>. This updated the index, however now refs/remotes/origin/ still contains HEAD insted of master.
Found the line in that failed in this lib to be:
|
.find_reference("refs/remotes/origin/master")? |
Confirmed that running
mv HEAD master temporarily fixed the problem.
Running any
cargo add {crate}would fail with:After some debugging i found that the cargo index had its 'refs/remotes/origin' set to
HEADinstead 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 containsHEADinsted 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 mastertemporarily fixed the problem.