Update unstable.md with new gitoxide options for shallow clones

Co-authored-by: Weihang Lo <me@weihanglo.tw>
This commit is contained in:
Sebastian Thiel 2023-05-03 08:49:30 +02:00
parent 3bd08d934b
commit d2734d305b
No known key found for this signature in database
GPG Key ID: 9CB5EE7895E8268B

View File

@ -1260,10 +1260,20 @@ to run with `gitoxide` with the `-Zgitoxide=operation[,operationN]` syntax.
Valid operations are the following:
* `fetch` - All fetches are done with `gitoxide`, which includes git dependencies as well as the crates index.
* `shallow-index` *(planned)* - perform a shallow clone of the index.
* `shallow-deps` *(planned)* - perform a shallow clone of git dependencies.
* `shallow-index` - perform a shallow clone of the index.
* `shallow-deps` - perform a shallow clone of git dependencies.
* `checkout` *(planned)* - checkout the worktree, with support for filters and submodules.
**Details on shallow clones**
* To enable shallow clones, add `-Zgitoxide=fetch,shallow_deps` for fetching git dependencies or `-Zgitoxide=fetch,shallow_index` for fetching registry index.
* Shallow-cloned and shallow-checked-out git repositories reside at their own `-shallow` suffixed directories, i.e,
- `~/.cargo/registry/index/*-shallow`
- `~/.cargo/git/db/*-shallow`
- `~/.cargo/git/checkouts/*-shallow`
* When the unstable feature is on, fetching/cloning a git repository is always a shallow fetch. This roughly equals to `git fetch --depth 1` everywhere.
* Even with the presence of `Cargo.lock` or specifying a commit `{ rev = "…" }`, gitoxide is still smart enough to shallow fetch without unshallowing the existing repository.
## Stabilized and removed features
### Compile progress