-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cargo should not download the full code repository on which it depends. #14689
Comments
Please provide a reproduction. Thank you. |
Okay I see what you mean. We have a specialized branch for GitHub because
See what we did for GitHub:
Hence please provide the platform you want to speed up with their docs about Git capabilities and API support. We will evaluate whether the case is worth a dedicated solution. Worth noting that tags fetch is not the major contributing factor of fetching Git dependencies, shallow clones is the game changer which we already have an unstable feature waiting for feedback. |
There might be another approach of tackling this: if the locked dependency has a tag information, try fetching the tag first. If the tag has no commit we want, fall back to full fetch. I would say this may add too much complexity and most users on GitHub already get benefits from GitHub fast path and won't gain any value from this. To me this solution may not be worth hitting our heads hard. |
You're right. The current cost of pulling full tags is not high, and the community should not pay too much for customization. We can wait until the shallow clones is ready. |
Problem
like #14687
Some of the problems are solved in the previous issue. However, when the Cargo.lock file is carried and is not a GitHub code repository, the cargo will go to the GitReference::Rev branch due to the lock file. As a result, the cargo will download all tags.
cargo/src/cargo/sources/git/utils.rs
Lines 983 to 1010 in 1975c3c
Proposed Solution
In the fetchall tag scenario, if the content in the source is a tag, the tag branch is used.
Notes
No response
The text was updated successfully, but these errors were encountered: