Merge branch 'nd/attr-match-optim-more'
[gitweb.git] / git-submodule.sh
index e8112c8d1a79d3ad654041d1e61d168fb3992b06..3d1617fa9eb490463f9a4a4218082de168e1491a 100755 (executable)
@@ -270,7 +270,6 @@ cmd_add()
                        ;;
                --reference=*)
                        reference="$1"
-                       shift
                        ;;
                --name)
                        case "$2" in '') usage ;; esac
@@ -1132,7 +1131,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