Support shallow fetch through net.git-fetch-with-cli
#14956
Labels
A-git
Area: anything dealing with git
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-accepted
Status: Issue or feature is accepted, and has a team member available to help mentor or review
Problem
#13285 tracks the ability of fetching registry index and git dependencies in “shallow fetch” mode. We have both libgit2 and gitoxide backend supporting this. Our third git backend, the famous "git" CLI, hasn't yet supported the feature.
During the discussion of stabilizing shallow fetch on Zulip, we would like to see
net.git-fetch-with-cli
have this feature as well, for a better consistency among each git backend.Proposed Solution
The function drives git CLI is
fetch_with_cli
. Need togit
to replicate whatfetch_with_gitoxide
andfetch_with_libgit2
have done for shallow fetches.Currently they should be under
~/.cargo/git/{db,checkout}/*-shallow
, and~/.cargo/registry/index/*-shallow
Notes
No response
The text was updated successfully, but these errors were encountered: