Thread (15 messages) flat view 15 messages, 5 authors, 2016-06-15

Re: [PATCH/RFC] Changing submodule foreach --recursive to be depth-first, --parent option to execute command in supermodule as well

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:18

Possibly related (same subject, not in this thread)

Eric Cousineau [off-list ref] writes:
Would these be the correct behaviors of Heiko's implementation?
I do not think Heiko already has an implementation, but let's try to
see how each example makes sense.
git submodule foreach # Empty command, pre-order
git submodule foreach --pre-order # Same behavior
git submodule foreach --post-order # Empty command, post-order
OK.  The last one shows "I am here" output differently from the
other two, but otherwise they are all no-op.
git submodule foreach 'frotz' # Do 'frotz' pre-order in each submodule
OK.  And it would be the same if you said either one of:

	git submodule foreach --pre-order 'frotz'
	git submodule foreach --pre-order='frotz'
git submodule foreach --post-order 'frotz' # Do 'frotz' post-order in
each submodule
OK.
git submodule foreach --pre-order='frotz' --post-order='shimmy' # Do
'frotz' pre-order and 'shimmy' post-order in each submodule
OK.
git submodule foreach --post-order='shimmy' 'frotz' # Invalid usage of
the command
I would expect this to behave exactly the same as:

	git submodule foreach \
        	--post-order=shimmy \
                --pre-order=frotz
git submodule foreach --post-order --pre-order #
I expect it to behave exactly the same as:

	git submodule foreach --post-order=: --pre-order=:
It should not be too hard to have this functionality affect the
--include-super command as well.
I would assume that

	git submodule foreach --pre-order=A --post-order=B --include-super

would be identical to running

	A &&
        git submodule foreach --pre-order=A --post-order=B &&
        B

I am not entirely convinced we would want --include-super in the
first place, though.  It does not belong to "submodule foreach";
it is doing something _outside_ the submoudules.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help