-
Couldn't load subscription status.
- Fork 2.7k
docs: mention how Cargo fetch git submodules #15853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first paragraph talks in terms of behavior (fetch) while the second paragraph talks in terms of a git submodule specific term (update) that I worry may confuse users.
What do you think of:
| 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`] in the dependency repo's `.gitmodules`. | |
| This requires write access to the repo and will disable submodule updates more generally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit more concise and understandable!
address <#15853 (comment)> r? epage
Update cargo submodule 12 commits in 71eb84f21aef43c07580c6aed6f806a6299f5042..623d536836b4cde09ce38609232a024d5b25da81 2025-08-17 17:18:56 +0000 to 2025-08-22 19:05:52 +0000 - test(frontmatter): Match test updates in rustc (rust-lang/cargo#15878) - chore: fix some typos in comment (rust-lang/cargo#15877) - Add Arm64 Windows CI jobs (rust-lang/cargo#15790) - suggest workspace hints for boolean dependencies (rust-lang/cargo#15507) - make `UnitGenerator` public in cargo-as-a-library (rust-lang/cargo#15873) - Linting system (rust-lang/cargo#15865) - Switch to using native mdbook fragment redirects (rust-lang/cargo#15861) - docs(profile): revert wrong statement of lto options' optimization (rust-lang/cargo#15855) - docs: avoid ambiguity between update and fetch (rust-lang/cargo#15860) - docs: mention how Cargo fetch git submodules (rust-lang/cargo#15853) - feat(unstable): Added `-Zbuild-dir-new-layout` unstable feature (rust-lang/cargo#15848) - Implement `host`-target substitution (rust-lang/cargo#15838) r? ghost
Update cargo submodule 12 commits in 71eb84f21aef43c07580c6aed6f806a6299f5042..623d536836b4cde09ce38609232a024d5b25da81 2025-08-17 17:18:56 +0000 to 2025-08-22 19:05:52 +0000 - test(frontmatter): Match test updates in rustc (rust-lang/cargo#15878) - chore: fix some typos in comment (rust-lang/cargo#15877) - Add Arm64 Windows CI jobs (rust-lang/cargo#15790) - suggest workspace hints for boolean dependencies (rust-lang/cargo#15507) - make `UnitGenerator` public in cargo-as-a-library (rust-lang/cargo#15873) - Linting system (rust-lang/cargo#15865) - Switch to using native mdbook fragment redirects (rust-lang/cargo#15861) - docs(profile): revert wrong statement of lto options' optimization (rust-lang/cargo#15855) - docs: avoid ambiguity between update and fetch (rust-lang/cargo#15860) - docs: mention how Cargo fetch git submodules (rust-lang/cargo#15853) - feat(unstable): Added `-Zbuild-dir-new-layout` unstable feature (rust-lang/cargo#15848) - Implement `host`-target substitution (rust-lang/cargo#15838) r? ghost
Update cargo submodule 12 commits in 71eb84f21aef43c07580c6aed6f806a6299f5042..623d536836b4cde09ce38609232a024d5b25da81 2025-08-17 17:18:56 +0000 to 2025-08-22 19:05:52 +0000 - test(frontmatter): Match test updates in rustc (rust-lang/cargo#15878) - chore: fix some typos in comment (rust-lang/cargo#15877) - Add Arm64 Windows CI jobs (rust-lang/cargo#15790) - suggest workspace hints for boolean dependencies (rust-lang/cargo#15507) - make `UnitGenerator` public in cargo-as-a-library (rust-lang/cargo#15873) - Linting system (rust-lang/cargo#15865) - Switch to using native mdbook fragment redirects (rust-lang/cargo#15861) - docs(profile): revert wrong statement of lto options' optimization (rust-lang/cargo#15855) - docs: avoid ambiguity between update and fetch (rust-lang/cargo#15860) - docs: mention how Cargo fetch git submodules (rust-lang/cargo#15853) - feat(unstable): Added `-Zbuild-dir-new-layout` unstable feature (rust-lang/cargo#15848) - Implement `host`-target substitution (rust-lang/cargo#15838) r? ghost
What does this PR try to resolve?
Clarify how git submodules are handled in Cargo for
gitdependencies.See #4247 (comment)