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

git deps: use branch "main" if "master" does not exist #8946

Closed
birkenfeld opened this issue Dec 5, 2020 · 2 comments
Closed

git deps: use branch "main" if "master" does not exist #8946

birkenfeld opened this issue Dec 5, 2020 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@birkenfeld
Copy link
Contributor

With more projects switching to their primary branch being called "main" instead of "master", simply adding a git dependency will fail. This is a usability issue, and since I assume the Rust project supports the use of this alternate nomenclature, it should do its part to support it.

E.g. with ureq:

error: failed to get `ureq` as a dependency of package ...

Caused by:
  failed to load source for dependency `ureq`

Caused by:
  Unable to update https://github.com/algesten/ureq

Caused by:
  failed to find branch `master`

Caused by:
  cannot locate remote-tracking branch 'origin/master'; class=Reference (4); code=NotFound (-3)
@birkenfeld birkenfeld added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Dec 5, 2020
@ehuss
Copy link
Contributor

ehuss commented Dec 5, 2020

Thanks for the report. This is loosely tracked in issue #3517. Support as already been implemented in #8522, but this requires a change in the format of Cargo.lock, so it takes a long time to roll out the transition. Support for it will probably start phasing in sometime next year.

@birkenfeld
Copy link
Contributor Author

Thanks, I'll close this then.

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