t2300: use documented technique to invoke git-sh-setup
[gitweb.git] / builtin-clone.c
index 0a4f6124f57eedd16e99d3f70c4385e760092047..caf3025031d83dc860b22c7798dd5f40b6b89ed2 100644 (file)
@@ -379,8 +379,13 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        argc = parse_options(argc, argv, prefix, builtin_clone_options,
                             builtin_clone_usage, 0);
 
+       if (argc > 2)
+               usage_msg_opt("Too many arguments.",
+                       builtin_clone_usage, builtin_clone_options);
+
        if (argc == 0)
-               die("You must specify a repository to clone.");
+               usage_msg_opt("You must specify a repository to clone.",
+                       builtin_clone_usage, builtin_clone_options);
 
        if (option_mirror)
                option_bare = 1;