Support --remote for GIT_SUBMODULE_STRATEGY
Description
Currently, the GIT_SUBMODULE_STRATEGY
(see the docs) supports normal and recursive checkouts of submodules. Git additionally supports the --remote
flag, which fetches the latest version of the submodule, and not the one tagged in the repository.
We have the following use case: Several projects on GitLab have documentation in a docs/
folder. To combine this documentation in one single page, a separate project contains all those projects as submodules and extracts the documentation in a CI build step. As we always want to have the latest documentation without constantly having to update the submodule hash on every commit, we update the submodules in the build step again with the added --remote
flag.
This could already be done when checking out the sources, which would make the additional step obsolete.
Proposal
Add GIT_SUBMODULE_REMOTE_STRATEGY
which, when set to true
, adds the --remote
flag to the git submodule update
command.