clone: teach recursive clones to respect -q
Teach 'git clone --recurse-submodules' to respect the '-q' option by passing down the quiet flag to the process which handles cloning of submodules. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams committed
Aug 3, 2017 at 15:25 UTC
03c004c581fb0ecd40bf21990449f393934b15ef
2 files changed
+9
builtin/clone.c
+3
@@ -764,6 +764,9 @@ static int checkout(int submodule_progress)
764
if (submodule_progress)
765
argv_array_push(&args, "--progress");
766
767
+ if (option_verbosity < 0)
768
+ argv_array_push(&args, "--quiet");
769
+
770
err = run_command_v_opt(args.argv, RUN_GIT_CMD);
771
argv_array_clear(&args);
772
}
t/t7400-submodule-basic.sh
+6
@@ -1289,4 +1289,10 @@ test_expect_success 'init properly sets the config' '
1289
test_must_fail git -C multisuper_clone config --get submodule.sub1.active
1290
'
1291
1292
+test_expect_success 'recursive clone respects -q' '
1293
+ test_when_finished "rm -rf multisuper_clone" &&
1294
+ git clone -q --recurse-submodules multisuper multisuper_clone >actual &&
1295
+ test_must_be_empty actual
1296
+'
1297
+
1298
test_done