mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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 <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
59e1205d16
commit
39835409d1
21
transport.h
21
transport.h
@@ -233,17 +233,24 @@ int transport_push(struct repository *repo,
|
||||
struct refspec *rs, int flags,
|
||||
unsigned int * reject_reasons);
|
||||
|
||||
struct transport_ls_refs_options {
|
||||
/*
|
||||
* Optionally, a list of ref prefixes can be provided which can be sent
|
||||
* to the server (when communicating using protocol v2) to enable it to
|
||||
* limit the ref advertisement. Since ref filtering is done on the
|
||||
* server's end (and only when using protocol v2),
|
||||
* transport_get_remote_refs() could return refs which don't match the
|
||||
* provided ref_prefixes.
|
||||
*/
|
||||
struct strvec ref_prefixes;
|
||||
};
|
||||
#define TRANSPORT_LS_REFS_OPTIONS_INIT { STRVEC_INIT }
|
||||
|
||||
/*
|
||||
* Retrieve refs from a remote.
|
||||
*
|
||||
* Optionally a list of ref prefixes can be provided which can be sent to the
|
||||
* server (when communicating using protocol v2) to enable it to limit the ref
|
||||
* advertisement. Since ref filtering is done on the server's end (and only
|
||||
* when using protocol v2), this can return refs which don't match the provided
|
||||
* ref_prefixes.
|
||||
*/
|
||||
const struct ref *transport_get_remote_refs(struct transport *transport,
|
||||
const struct strvec *ref_prefixes);
|
||||
struct transport_ls_refs_options *transport_options);
|
||||
|
||||
/*
|
||||
* Fetch the hash algorithm used by a remote.
|
||||
|
||||
Reference in New Issue
Block a user