summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-29 22:28:32 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-29 22:28:33 -0700
commitda5a2bd525400b9106dfdccc61e2079a97589a0d (patch)
tree0570db7805ae7626487ba9e5e3851a287386a081 /git-submodule.sh
parentf06e207c906aacf25441f9093e34ee012f534c24 (diff)
parentaf9c9f97137dfb3f20a17d76520803c0312fd3e4 (diff)
downloadgit-da5a2bd525400b9106dfdccc61e2079a97589a0d.tar.gz
Merge branch 'rr/maint-submodule-unknown-cmd'
* 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 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