As noted in issue #409, git meta does not yet support the submodule foreach command. This PR adds the foreach command by forwarding to vanilla git. It exposes the following command line interface, which supports all arguments available in vanilla git:
▶ gm submodule foreach --help
usage: git-meta submodule foreach [-h] [--recursive] [--quiet] foreach-command
Evaluate a shell command in each open sub-repo. Any sub-repo in the meta-repo
that is not opened is ignored by this command.
Positional arguments:
foreach-command shell command to execute for each open sub-repo
Optional arguments:
-h, --help Show this help message and exit.
--recursive sub-repos are traversed recursively
--quiet only print error messages
An example execution of the command to print the working directory of each open sub-repo is as follows:
Note: Forwarding is not done directly in git-meta.js, but rather cmd/submodule.js. This is because there are subcommands under git meta submodule that are not forwarded to vanilla git.
As noted in issue #409, git meta does not yet support the
submodule foreach
command. This PR adds the foreach command by forwarding to vanilla git. It exposes the following command line interface, which supports all arguments available in vanilla git:An example execution of the command to print the working directory of each open sub-repo is as follows:
Note: Forwarding is not done directly in
git-meta.js
, but rathercmd/submodule.js
. This is because there are subcommands undergit meta submodule
that are not forwarded to vanilla git.