Jeff King <peff@xxxxxxxx> writes: >> We could mimic "find" and make "foreach" that has no action default >> to an equivalent of "echo" that is done internally without forking. > > That would be reasonable to me, though I wonder what the output format > should be. Just name, or name/oid? Once you start having options, you > might as well just add a separate "git submodule list" that can take > them. Users of "find" seem to be happy with "-print" being the default, so whatever we were doing with the internal "helper --list" would be appropriate here. Folks who want different output can feed their own action.