Skip to content

Pass clean command args to sub modules

What does this MR do?

This MR allows git clean flags to be passed to git submodules. When no git clean flags are provided, it defaults to -ffdx. Example: GIT_CLEAN_FLAGS=-n

Why was this MR needed?

Currently, we are specifying git clean flags but these flags aren't being passed to submodules. Instead, it always uses -ffdx which doesn't seem intuitive after specifying our own git clean flags to use.

What's the best way to test this MR?

Set up a repository with GIT_CLEAN_FLAGS=-n, GIT_SUBMODULE_STRATEGY=recursive and a Git submodule. Make a build process that writes a file into the submodule's folder. If the file does not get cleaned out next time the build runs, then the MR works.

What are the relevant issue numbers?

Merge request reports