Junio C Hamano <gits...@pobox.com> writes:
> Assuming that the above guess is correct (which is a huge
> assumption, given the lack of clarity in the description), I think
> the feature might make sense. The example would have been a lot
> easier to follow if it were something like this:
> $ git submodule foreach --revision v1.0 'git grep -e frotz $sha1'
Imagine you have a checkout of v2.0 of the superproject in your
working tree, and you run "git submodule foreach --revision v1.0".
Further imagine a submodule S that used to exist back when the
superproject was at v1.0 no longer exists in the current codebase
(hence there is no such submodule in the working tree).
Shouldn't the above "foreach ... grep" still try to find 'frotz' in
the submodule S that was bound to v1.0 of the superproject?
Given that your patch does not touch the part of cmd_foreach where
it decides which submodule to descend into, it still will base its
decision solely on the set of submodules that are bound to and have
been "git submodule init"ed in the version of the superproject that
is _currently_ checked out, no?
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html