提交 03c004c5 编写于 作者: B Brandon Williams 提交者: Junio C Hamano

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: NBrandon Williams <bmwill@google.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 cf8899d2
......@@ -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);
}
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册