diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-10-02 13:42:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-02 13:42:32 -0700 |
commit | e2c7a5b646bb9a4f126577346697d79b3143d30b (patch) | |
tree | 9cde48edade6f47bebff07e41e4f02c045c35879 /git-submodule.sh | |
parent | 0a65df58a0d5b17a72edd4e6247be29ab8af2b09 (diff) | |
parent | af9c9f97137dfb3f20a17d76520803c0312fd3e4 (diff) | |
download | git-e2c7a5b646bb9a4f126577346697d79b3143d30b.tar.gz |
Merge branch 'rr/maint-submodule-unknown-cmd' into maint
"git submodule frotz" was not diagnosed as "frotz" being an unknown
subcommand to "git submodule"; the user instead got a complaint that
"git submodule status" was run with an unknown path "frotz".
* rr/maint-submodule-unknown-cmd:
submodule: if $command was not matched, don't parse other args
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 3e2045e52d..ab6b1107b6 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -1107,7 +1107,15 @@ do done # No command word defaults to "status" -test -n "$command" || command=status +if test -z "$command" +then + if test $# = 0 + then + command=status + else + usage + fi +fi # "-b branch" is accepted only by "add" if test -n "$branch" && test "$command" != add |