Skip to content

Commit 0e9e938

Browse files
fix(submodules): make git submodule update always recursive (#30361)
Co-authored-by: Rhys Arkins <[email protected]>
1 parent 9ae6940 commit 0e9e938

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/usage/configuration-options.md

+1
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ For `sbt` note that Renovate will update the version string only for packages th
443443
## cloneSubmodules
444444

445445
Enabling this option will mean that any detected Git submodules will be cloned at time of repository clone.
446+
Submodules are always cloned recursively.
446447

447448
Important: private submodules aren't supported by Renovate, unless the underlying `ssh` layer already has the correct permissions.
448449

lib/util/git/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ export async function cloneSubmodules(shouldClone: boolean): Promise<void> {
354354
for (const submodule of submodules) {
355355
try {
356356
logger.debug(`Cloning git submodule at ${submodule}`);
357-
await gitRetry(() => git.submoduleUpdate(['--init', submodule]));
357+
await gitRetry(() =>
358+
git.submoduleUpdate(['--init', '--recursive', submodule]),
359+
);
358360
} catch (err) {
359361
logger.warn(
360362
{ err },

0 commit comments

Comments
 (0)