Skip to content
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

check main branch by default when cargo install --git executed #8827

Closed
non-descriptive opened this issue Nov 3, 2020 · 1 comment
Closed
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@non-descriptive
Copy link

Due to recent changes default branch of new git projects will be set to main instead of master, so it is probably good idea to check both default branch names. Attempt to install project with main default branch with just cargo install --git currently will fail with

error: failed to find branch `master`

                                     Caused by:
                                                 cannot locate remote-tracking branch 'origin/master'; class=Reference (4); code=NotFound (-3)

Current workaround requires explicitly pass --branch main to cargo.

last tested on
cargo 1.47.0 (f3c7e066a 2020-08-28)

@non-descriptive non-descriptive added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Nov 3, 2020
@ehuss
Copy link
Contributor

ehuss commented Nov 3, 2020

Thanks for the report. Closing as a duplicate of #3517.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants