From 33baa940c027af4ec638c2df3a16d0c165fe7e61 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Mon, 18 Aug 2025 12:16:36 -0400 Subject: [PATCH] docs: avoid ambiguity between update and fetch --- src/doc/src/reference/specifying-dependencies.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/doc/src/reference/specifying-dependencies.md b/src/doc/src/reference/specifying-dependencies.md index 1adfa6846..1bc246c8f 100644 --- a/src/doc/src/reference/specifying-dependencies.md +++ b/src/doc/src/reference/specifying-dependencies.md @@ -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..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..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..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