path: root/transport.c
diff options
authorBrandon Williams <>2018-04-23 22:46:24 (GMT)
committerJunio C Hamano <>2018-04-24 02:24:40 (GMT)
commit5e3548ef161d4d284e35cf5f5d6a181ba4fe707b (patch)
treea1e5175546417ed701dbe109b683142b95111261 /transport.c
parentff473221b4d6cf0894ba47370492d853a36c024d (diff)
fetch: send server options when using protocol v2
Teach fetch to optionally accept server options by specifying them on the cmdline via '-o' or '--server-option'. These server options are sent to the remote end when performing a fetch communicating using protocol version 2. If communicating using a protocol other than v2 the provided options are ignored and not sent to the remote end. Signed-off-by: Brandon Williams <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'transport.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index e324fa2..6bce2b2 100644
--- a/transport.c
+++ b/transport.c
@@ -266,6 +266,7 @@ static int fetch_refs_via_pack(struct transport *transport,
args.no_dependents = data->options.no_dependents;
args.filter_options = data->options.filter_options;
args.stateless_rpc = transport->stateless_rpc;
+ args.server_options = transport->server_options;
if (!data->got_remote_heads)
refs_tmp = get_refs_via_connect(transport, 0, NULL);