File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ status::
112
112
initialized, `+` if the currently checked out submodule commit
113
113
does not match the SHA-1 found in the index of the containing
114
114
repository and `U` if the submodule has merge conflicts.
115
- This command is the default command for 'git submodule'.
116
115
+
117
116
If `--recursive` is specified, this command will recurse into nested
118
117
submodules, and show their status as well.
Original file line number Diff line number Diff line change @@ -1107,7 +1107,15 @@ do
1107
1107
done
1108
1108
1109
1109
# No command word defaults to "status"
1110
- test -n " $command " || command=status
1110
+ if test -z " $command "
1111
+ then
1112
+ if test $# = 0
1113
+ then
1114
+ command=status
1115
+ else
1116
+ usage
1117
+ fi
1118
+ fi
1111
1119
1112
1120
# "-b branch" is accepted only by "add"
1113
1121
if test -n " $branch " && test " $command " ! = add
Original file line number Diff line number Diff line change @@ -438,8 +438,8 @@ test_expect_success 'moving to a commit without submodule does not leave empty d
438
438
git checkout second
439
439
'
440
440
441
- test_expect_success ' submodule <invalid-path> warns ' '
442
- test_failure_with_unknown_submodule
441
+ test_expect_success ' submodule <invalid-subcommand> fails ' '
442
+ test_must_fail git submodule no-such-subcommand
443
443
'
444
444
445
445
test_expect_success ' add submodules without specifying an explicit path' '
You can’t perform that action at this time.
0 commit comments