Skip to content

Commit

Permalink
Add init_submodules to git_override
Browse files Browse the repository at this point in the history
This is slightly different from the starlark version which has a separate init_submodules and recursive_init_submodules for historical reasons.

Closes #20937.

PiperOrigin-RevId: 600337195
Change-Id: I6e26d58f442d3e2c85feee20c14017b5a13fa588
  • Loading branch information
keith authored and Wyverald committed Jan 26, 2024
1 parent 243e3d2 commit 00998c5
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1038,14 +1038,21 @@ public void archiveOverride(
named = true,
positional = false,
defaultValue = "0"),
@Param(
name = "init_submodules",
doc = "Whether submodules in the fetched repo should be recursively initialized.",
named = true,
positional = false,
defaultValue = "False"),
})
public void gitOverride(
String moduleName,
String remote,
String commit,
Iterable<?> patches,
Iterable<?> patchCmds,
StarlarkInt patchStrip)
StarlarkInt patchStrip,
boolean initSubmodules)
throws EvalException {
hadNonModuleCall = true;
addOverride(
Expand All @@ -1055,7 +1062,8 @@ public void gitOverride(
commit,
Sequence.cast(patches, String.class, "patches").getImmutableList(),
Sequence.cast(patchCmds, String.class, "patchCmds").getImmutableList(),
patchStrip.toInt("git_override.patch_strip")));
patchStrip.toInt("git_override.patch_strip"),
initSubmodules));
}

@StarlarkMethod(
Expand Down

0 comments on commit 00998c5

Please sign in to comment.