Skip to content

Commit 03c004c

Browse files
bmwillgitster
authored andcommitted
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>
1 parent cf8899d commit 03c004c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

builtin/clone.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,9 @@ static int checkout(int submodule_progress)
764764
if (submodule_progress)
765765
argv_array_push(&args, "--progress");
766766

767+
if (option_verbosity < 0)
768+
argv_array_push(&args, "--quiet");
769+
767770
err = run_command_v_opt(args.argv, RUN_GIT_CMD);
768771
argv_array_clear(&args);
769772
}

t/t7400-submodule-basic.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,4 +1289,10 @@ test_expect_success 'init properly sets the config' '
12891289
test_must_fail git -C multisuper_clone config --get submodule.sub1.active
12901290
'
12911291

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+
12921298
test_done

0 commit comments

Comments
 (0)