mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
docs: avoid ambiguity between update and fetch (#15860)
address <https://github.com/rust-lang/cargo/pull/15853#discussion_r2282734460> r? epage
This commit is contained in:
commit
dd69fab752
@ -307,13 +307,11 @@ When cloning a `git` dependency,
|
||||
Cargo automatically fetches its submodules recursively
|
||||
so that all required code is available for the build.
|
||||
|
||||
To skip updates for a specific submodule,
|
||||
Cargo respects the [`submodule.<name>.update`] setting in `.gitmodules`.
|
||||
Setting it to `none` disables updates for that submodule if it isn't needed for the build.
|
||||
This is usually set in the repository itself,
|
||||
so changes require access to the dependency's repo.
|
||||
To skip fetching submodules unrelated to the build,
|
||||
you can set [`submodule.<name>.update = none`][submodule-update] in the dependency repo's `.gitmodules`.
|
||||
This requires write access to the repo and will disable submodule updates more generally.
|
||||
|
||||
[`submodule.<name>.update`]: https://git-scm.com/docs/gitmodules#Documentation/gitmodules.txt-submodulenameupdate
|
||||
[submodule-update]: https://git-scm.com/docs/gitmodules#Documentation/gitmodules.txt-submodulenameupdate
|
||||
|
||||
### Accessing private Git repositories
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user