-
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
Tracking Issue for -Zgit
#13285
Comments
My
But on running
Keep repeating Also modifying it to:
does not give any error but I don't know if its working or not. |
Under ~/.cargo/git $ tree -L 2
./
├── checkouts/
│ └── empty-library-0161899a0cd3bb43-shallow/
└── db/
└── empty-library-0161899a0cd3bb43-shallow/ As of this writing, you need this in your [unstable.git]
shallow_index = true
shallow_deps = true
[unstable.gitoxide]
fetch = true
checkout = true
list_files = true
internal_use_git2 = false It is not ergonomic, but while it is still unstable, I am not too concerned. If people want to fix it, go for it! See #11813 (comment) as well. |
(Maybe a bit off topic) what is the relationship between |
|
for build environments partial clones in the sense of
make most sense. shallow clones i the sense of @weihanglo what you think about ditching "shallow" in general as dead end and replace with "partial"? @cesfahani did a promising start: GitoxideLabs/gitoxide#1046 . |
Sparse checkout and partial clone have been discussed in #11165. It is possible that Cargo ditch or adopt anything for |
Allows the default git/gitoxide configuration to be obtained from the ENV and config ### What does this PR try to resolve? The default git/gitoxide feautures config can be obtained througt `-Zgit` and `-Zgitoxide`. However, it cannot be obtained from environment variables or configurations. It's not very ergonomic. ### How should we test and review this PR? The previous commit explained the staus quo, the next commit addressed the problem. ### Additional information Inspired by #11813 (comment) See also #13285 (comment) ### Change of usage 1. Mirror Zgit/Zgitoxide when they parsed as string Specify the feature you like ``` CARGO_UNSABLE_GIT='shallow-deps' cargo fetch cargo fetch --config "unstable.git='shallow-deps'" cargo fetch -Zgit="shallow-deps" ``` 2. Specify partial fields when parsed as table ``` CARGO_UNSTABLE_GITOXIDE_FETCH=true cargo fetch ``` The rest fields will use Rust default value. That said, checkout and internal_use_git2 will be false. Besides, you can pass true to the whole feature to specify the pre-defined features. ``` CARGO_UNSTABLE_GITOXIDE=true cargo fetch ```
Summary
Original issue: #1171. See also #11813
Implementation: #13252
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#git
-Zgit
is a collection of new Git features in Cargo. Currently we have experiments onUnresolved Issues
file
shallow clones for either gitoxide or libgit2file
protocol GitoxideLabs/gitoxide#734file:
protocol.*-shallow
directory layout optimal? Can we avoid that but remain compatible?net.git-fetch-with-cli
supports shallow fetch Support shallow fetch throughnet.git-fetch-with-cli
#14956Future Extensions
See "Future Extensions" in #11813. Most of them depend on upstream features in libgit2.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
The text was updated successfully, but these errors were encountered: