-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
What does this PR try to resolve?
Clarify how git submodules are handled in Cargo for
git
dependencies.See #4247 (comment)