summaryrefslogtreecommitdiff
path: root/t/t7407-submodule-foreach.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-09 22:25:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-09 22:25:46 (GMT)
commit968eecbd01e06aa8cae6c7fd8bf0a7b9bbd3b1fc (patch)
tree44a2146a63fcb61544a4d9864d56f9ae61e40cc4 /t/t7407-submodule-foreach.sh
parent88b10757593ab47354a3c9d191d7c03d584a40cf (diff)
parent30db18b148c4951deb2c870b5243fb5b18ecb5ed (diff)
downloadgit-968eecbd01e06aa8cae6c7fd8bf0a7b9bbd3b1fc.zip
git-968eecbd01e06aa8cae6c7fd8bf0a7b9bbd3b1fc.tar.gz
git-968eecbd01e06aa8cae6c7fd8bf0a7b9bbd3b1fc.tar.bz2
Merge branch 'ms/submodule-foreach-fix'
"git submodule foreach" did not protect command line options passed to the command to be run in each submodule correctly, when the "--recursive" option was in use. * ms/submodule-foreach-fix: submodule foreach: fix recursion of options
Diffstat (limited to 't/t7407-submodule-foreach.sh')
-rwxr-xr-xt/t7407-submodule-foreach.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
index 706ae76..6b2aa91 100755
--- a/t/t7407-submodule-foreach.sh
+++ b/t/t7407-submodule-foreach.sh
@@ -421,4 +421,11 @@ test_expect_success 'option-like arguments passed to foreach commands are not lo
test_cmp expected actual
'
+test_expect_success 'option-like arguments passed to foreach recurse correctly' '
+ git -C clone2 submodule foreach --recursive "echo be --an-option" >expect &&
+ git -C clone2 submodule foreach --recursive echo be --an-option >actual &&
+ grep -e "--an-option" expect &&
+ test_cmp expect actual
+'
+
test_done