Skip to content

Commit dd69fab

Browse files
authored
docs: avoid ambiguity between update and fetch (#15860)
address <#15853 (comment)> r? epage
2 parents 62537dd + 33baa94 commit dd69fab

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/doc/src/reference/specifying-dependencies.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,11 @@ When cloning a `git` dependency,
307307
Cargo automatically fetches its submodules recursively
308308
so that all required code is available for the build.
309309

310-
To skip updates for a specific submodule,
311-
Cargo respects the [`submodule.<name>.update`] setting in `.gitmodules`.
312-
Setting it to `none` disables updates for that submodule if it isn't needed for the build.
313-
This is usually set in the repository itself,
314-
so changes require access to the dependency's repo.
310+
To skip fetching submodules unrelated to the build,
311+
you can set [`submodule.<name>.update = none`][submodule-update] in the dependency repo's `.gitmodules`.
312+
This requires write access to the repo and will disable submodule updates more generally.
315313

316-
[`submodule.<name>.update`]: https://git-scm.com/docs/gitmodules#Documentation/gitmodules.txt-submodulenameupdate
314+
[submodule-update]: https://git-scm.com/docs/gitmodules#Documentation/gitmodules.txt-submodulenameupdate
317315

318316
### Accessing private Git repositories
319317

0 commit comments

Comments
 (0)