Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 08:38:15 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-23 08:38:15 +0300
commit41267e96972d5a158298f777caecd7433a1b1a94 (patch)
treec2203a195e741d750bfb5d65057f1fe06d140b00 /builtin/ls-remote.c
parent30b015bffe21a127d4f349f9e876562c3c94a1a2 (diff)
parent5e3548ef161d4d284e35cf5f5d6a181ba4fe707b (diff)
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 'builtin/ls-remote.c')
-rw-r--r--builtin/ls-remote.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index ca3f04a839e..1a25df7ee15 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -47,6 +47,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
const char **pattern = NULL;
struct argv_array ref_prefixes = ARGV_ARRAY_INIT;
int i;
+ struct string_list server_options = STRING_LIST_INIT_DUP;
struct remote *remote;
struct transport *transport;
@@ -73,6 +74,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
2, PARSE_OPT_NOCOMPLETE),
OPT_BOOL(0, "symref", &show_symref_target,
N_("show underlying ref in addition to the object pointed by it")),
+ OPT_STRING_LIST('o', "server-option", &server_options, N_("server-specific"), N_("option to transmit")),
OPT_END()
};
@@ -116,6 +118,8 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
transport = transport_get(remote, NULL);
if (uploadpack != NULL)
transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack);
+ if (server_options.nr)
+ transport->server_options = &server_options;
ref = transport_get_remote_refs(transport, &ref_prefixes);
if (transport_disconnect(transport)) {