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.