diff options
author | Brandon Williams <bmwill@google.com> | 2017-08-03 15:25:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-04 09:08:37 -0700 |
commit | 03c004c581fb0ecd40bf21990449f393934b15ef (patch) | |
tree | a88503c206459c608ee08f55f2815eae9c65271c | |
parent | cf8899d285d2648013040ec7196ffd3de0606664 (diff) | |
download | git-03c004c581fb0ecd40bf21990449f393934b15ef.tar.gz |
clone: teach recursive clones to respect -qbw/clone-recursive-quiet
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>
-rw-r--r-- | builtin/clone.c | 3 | ||||
-rwxr-xr-x | t/t7400-submodule-basic.sh | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index a6ae7d6180..f81b12330e 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -764,6 +764,9 @@ static int checkout(int submodule_progress) if (submodule_progress) argv_array_push(&args, "--progress"); + if (option_verbosity < 0) + argv_array_push(&args, "--quiet"); + err = run_command_v_opt(args.argv, RUN_GIT_CMD); argv_array_clear(&args); } diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index dcac364c5f..e9c3335b78 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -1289,4 +1289,10 @@ test_expect_success 'init properly sets the config' ' test_must_fail git -C multisuper_clone config --get submodule.sub1.active ' +test_expect_success 'recursive clone respects -q' ' + test_when_finished "rm -rf multisuper_clone" && + git clone -q --recurse-submodules multisuper multisuper_clone >actual && + test_must_be_empty actual +' + test_done |