apply: simplify build_fake_ancestor()
[gitweb.git] / git-submodule.sh
index 3e2045e52daf43cc351af23af0fd770fb1a5044f..ab6b1107b6090494f192f361471ed5748ffa7dc1 100755 (executable)
@@ -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