Skip to content

Commit d50d848

Browse files
avarttaylorr
authored andcommitted
submodule tests: test for a "foreach" blind-spot
We tested for "--" followed by command names, but not for "--" followed by an argument that looks like an option, let's do that. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 435285b commit d50d848

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

t/t7407-submodule-foreach.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ test_expect_success 'use "submodule foreach" to checkout 2nd level submodule' '
154154
)
155155
'
156156

157+
test_expect_success 'usage: foreach -- --not-an-option' '
158+
test_expect_code 1 git submodule foreach -- --not-an-option &&
159+
test_expect_code 1 git -C clone2 submodule foreach -- --not-an-option
160+
'
161+
157162
test_expect_success 'use "foreach --recursive" to checkout all submodules' '
158163
(
159164
cd clone2 &&

0 commit comments

Comments
 (0)