Skip to content

Clean updating the crates.io index sets 'refs/remotes/origin/' to HEAD insted of master #411

@meltinglava

Description

@meltinglava

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions