diff options
author | Brandon Williams <bmwill@google.com> | 2018-03-15 18:31:22 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-15 20:01:08 +0100 |
commit | 834cf34b26035abc58f7c2b0f2afd5527e93c30d (patch) | |
tree | 3138adb283ecc11f6b8e104a53e564866b652a54 /transport-helper.c | |
parent | connect: request remote refs using v2 (diff) | |
download | git-834cf34b26035abc58f7c2b0f2afd5527e93c30d.tar.xz git-834cf34b26035abc58f7c2b0f2afd5527e93c30d.zip |
transport: convert get_refs_list to take a list of ref prefixes
Convert the 'struct transport' virtual function 'get_refs_list()' to
optionally take an argv_array of ref prefixes. When communicating with
a server using protocol v2 these ref prefixes can be sent when
requesting a listing of their refs allowing the server to filter the
refs it sends based on the sent prefixes. This list will be ignored
when not using protocol v2.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r-- | transport-helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/transport-helper.c b/transport-helper.c index 5080150231..8774ab3013 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -1026,7 +1026,8 @@ static int has_attribute(const char *attrs, const char *attr) { } } -static struct ref *get_refs_list(struct transport *transport, int for_push) +static struct ref *get_refs_list(struct transport *transport, int for_push, + const struct argv_array *ref_prefixes) { struct helper_data *data = transport->data; struct child_process *helper; @@ -1039,7 +1040,7 @@ static struct ref *get_refs_list(struct transport *transport, int for_push) if (process_connect(transport, for_push)) { do_take_over(transport); - return transport->vtable->get_refs_list(transport, for_push); + return transport->vtable->get_refs_list(transport, for_push, ref_prefixes); } if (data->push && for_push) |