summaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:15 (GMT)
commit41267e96972d5a158298f777caecd7433a1b1a94 (patch)
treec2203a195e741d750bfb5d65057f1fe06d140b00 /fetch-pack.c
parent30b015bffe21a127d4f349f9e876562c3c94a1a2 (diff)
parent5e3548ef161d4d284e35cf5f5d6a181ba4fe707b (diff)
downloadgit-41267e96972d5a158298f777caecd7433a1b1a94.zip
git-41267e96972d5a158298f777caecd7433a1b1a94.tar.gz
git-41267e96972d5a158298f777caecd7433a1b1a94.tar.bz2
Merge branch 'bw/server-options'
The transport protocol v2 is getting updated further. * bw/server-options: fetch: send server options when using protocol v2 ls-remote: send server options when using protocol v2 serve: introduce the server-option capability
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index f93723f..490c38f 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1174,6 +1174,13 @@ static int send_fetch_request(int fd_out, const struct fetch_pack_args *args,
packet_buf_write(&req_buf, "command=fetch");
if (server_supports_v2("agent", 0))
packet_buf_write(&req_buf, "agent=%s", git_user_agent_sanitized());
+ if (args->server_options && args->server_options->nr &&
+ server_supports_v2("server-option", 1)) {
+ int i;
+ for (i = 0; i < args->server_options->nr; i++)
+ packet_write_fmt(fd_out, "server-option=%s",
+ args->server_options->items[i].string);
+ }
packet_buf_delim(&req_buf);
if (args->use_thin_pack)