]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7407-submodule-foreach.sh
Merge branch 'ms/submodule-foreach-fix'
[thirdparty/git.git] / t / t7407-submodule-foreach.sh
index 57e4b7f990d60cd5789a31f0ae20738196191c1d..6b2aa917e11871eb403c8c79725b1e1944f8d29f 100755 (executable)
@@ -411,6 +411,16 @@ test_expect_success 'multi-argument command passed to foreach is not shell-evalu
        test_cmp expected actual
 '
 
+test_expect_success 'option-like arguments passed to foreach commands are not lost' '
+       (
+               cd super &&
+               git submodule foreach "echo be --quiet" > ../expected &&
+               git submodule foreach echo be --quiet > ../actual
+       ) &&
+       grep -sq -e "--quiet" expected &&
+       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 &&