BF: publish: Tell git-fetch to not recurse into submodules #4560
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
publish() fetches the sibling before pushing, and has done so for a
long time (f07fc51, 2017-08-26). If the fetch brings down a
recorded submodule commit that is not yet present locally, by default
git also fetch in the submodule with the missing commit.
This is problematic because, as explained in dbd84e5 (ENH: update:
Try to fetch submodule commit explicitly if needed, 2020-02-07),
submodule.c hard codes 'origin' as a fallback to fetch from, so the
fetch will fail unless there's a remote named 'origin'. Also,
conceptually, the goal of this fetch seems to be to obtain up-to-date
information on the current repository, not its submodules, which
publish() will handle itself if called with --recursive.
Fetch with --recurse-submodules=no.