builtin/commit.c: extract ignore_non_trailer() helper function
[gitweb.git] / builtin / clone.c
index 874e0fd0b6e3ea4882783c0b2377016d93bd989d..cc11104d4267f61aa5a2aa5472a5c69c1ccd8994 100644 (file)
@@ -796,6 +796,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
        if (option_local > 0 && !is_local)
                warning(_("--local is ignored"));
 
+       /* no need to be strict, transport_set_option() will validate it again */
+       if (option_depth && atoi(option_depth) < 1)
+               die(_("depth %s is not a positive number"), option_depth);
+
        if (argc == 2)
                dir = xstrdup(argv[1]);
        else