mingw: ensure temporary file handles are not inherited by child processes
[gitweb.git] / builtin / clone.c
index 5f867e67d8066fe70fdd67c3d8e2853ea6c3eaa1..8f7db98af65bd104c9da96a6cb007a745f79b8a4 100644 (file)
@@ -40,7 +40,7 @@ static const char * const builtin_clone_usage[] = {
 
 static int option_no_checkout, option_bare, option_mirror, option_single_branch = -1;
 static int option_local = -1, option_no_hardlinks, option_shared, option_recursive;
-static int option_shallow_submodules = -1;
+static int option_shallow_submodules;
 static char *option_template, *option_depth;
 static char *option_origin = NULL;
 static char *option_branch = NULL;
@@ -738,8 +738,7 @@ static int checkout(void)
                struct argv_array args = ARGV_ARRAY_INIT;
                argv_array_pushl(&args, "submodule", "update", "--init", "--recursive", NULL);
 
-               if (option_shallow_submodules == 1
-                   || (option_shallow_submodules == -1 && option_depth))
+               if (option_shallow_submodules == 1)
                        argv_array_push(&args, "--depth=1");
 
                if (max_jobs != -1)