summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-02 20:42:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-10-02 20:42:32 (GMT)
commite2c7a5b646bb9a4f126577346697d79b3143d30b (patch)
tree9cde48edade6f47bebff07e41e4f02c045c35879 /git-submodule.sh
parent0a65df58a0d5b17a72edd4e6247be29ab8af2b09 (diff)
parentaf9c9f97137dfb3f20a17d76520803c0312fd3e4 (diff)
downloadgit-e2c7a5b646bb9a4f126577346697d79b3143d30b.zip
git-e2c7a5b646bb9a4f126577346697d79b3143d30b.tar.gz
git-e2c7a5b646bb9a4f126577346697d79b3143d30b.tar.bz2
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-xgit-submodule.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 3e2045e..ab6b110 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