From 39835409d10de2402c4b3e10dba20286989627d4 Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Fri, 5 Feb 2021 12:48:48 -0800 Subject: connect, transport: encapsulate arg in struct In a future patch we plan to return the name of an unborn current branch from deep in the callchain to a caller via a new pointer parameter that points at a variable in the caller when the caller calls get_remote_refs() and transport_get_remote_refs(). In preparation for that, encapsulate the existing ref_prefixes parameter into a struct. The aforementioned unborn current branch will go into this new struct in the future patch. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- connect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'connect.c') diff --git a/connect.c b/connect.c index 8b8f56cf6d..328c279250 100644 --- a/connect.c +++ b/connect.c @@ -453,12 +453,14 @@ void check_stateless_delimiter(int stateless_rpc, struct ref **get_remote_refs(int fd_out, struct packet_reader *reader, struct ref **list, int for_push, - const struct strvec *ref_prefixes, + struct transport_ls_refs_options *transport_options, const struct string_list *server_options, int stateless_rpc) { int i; const char *hash_name; + struct strvec *ref_prefixes = transport_options ? + &transport_options->ref_prefixes : NULL; *list = NULL; if (server_supports_v2("ls-refs", 1)) -- cgit v1.2.3