strvec_pushl(&argv, "-c", "fetch.bundleURI=",
"fetch", "--append", "--no-auto-gc",
"--no-write-commit-graph", NULL);
+ for (i = 0; i < server_options.nr; i++)
+ strvec_pushf(&argv, "--server-option=%s", server_options.items[i].string);
add_options_to_argv(&argv, config);
if (max_children != 1 && list->nr != 1) {
grep "server-option=world" log
'
+test_expect_success 'server-options are sent when fetch multiple remotes' '
+ test_when_finished "rm -f log server_options_sent" &&
+ git clone "file://$(pwd)/file_parent" child_multi_remotes &&
+ git -C child_multi_remotes remote add another "file://$(pwd)/file_parent" &&
+ GIT_TRACE_PACKET="$(pwd)/log" git -C child_multi_remotes -c protocol.version=2 \
+ fetch -o hello --all &&
+ grep "fetch> server-option=hello" log >server_options_sent &&
+ test_line_count = 2 server_options_sent
+'
+
test_expect_success 'server-options from configuration are used by git-fetch' '
test_when_finished "rm -rf log myclone" &&
git clone "file://$(pwd)/file_parent" myclone &&