Add `--recurse-submodules` flag to supporting commands
When a repository contains git submodules, the simple `git checkout`
command will leave the working tree with uncommited changes to the
submodule references (aka dirty). This then requires a second git command
to synchronize submodules.
The checkout command already has the `--recurse-submodules` argument
that will fetch submodules of checkout, ensuring that repository is in
Also using this flag with repositories that doesn't have submodules, the
checkout will succeed without any complaint.
The downside is that checkout command could issue multiple parallel
fetch calls that may generate high load on the server. This is why to
enable this feature, a modification to the plugin config is required.
This change adds a new plugin configuraiton option:
`download.recurseSubmodules`, by default set to `false`. That will add
`--recurse-submodules` flag to the "checkout", "branch", "reset" and
"pull" download commands.
Bug: Issue 302090044
10 files changed