]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ak/submodule-foreach-quoting'
authorJunio C Hamano <gitster@pobox.com>
Thu, 5 Dec 2013 20:53:17 +0000 (12:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Dec 2013 20:53:17 +0000 (12:53 -0800)
A behavior change, but a worthwhile one: "git submodule foreach"
was treating its arguments as part of a single command to be
concatenated and passed to a shell, making writing buggy
scripts too easy.

This patch preserves the old "just pass it to the shell" behavior
when a single argument is passed to 'git submodule foreach' and
moves to a new "skip the shell and use the arguments passed
unmolested" behavior when more than one argument is passed.

The old behavior (always concatenating and passing to the shell)
was similar to the 'ssh' command, while the new behavior (switching
on the number of arguments) is what 'xterm -e' does.

May need more thought to make sure this change is advertised well
so that scripts that used multiple arguments but added their own
extra layer of quoting are not broken.

* ak/submodule-foreach-quoting:
  submodule foreach: skip eval for more than one argument

1  2 
git-submodule.sh
t/t7407-submodule-foreach.sh

Simple merge
Simple merge