summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-04-23 22:46:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-24 02:24:40 (GMT)
commitff473221b4d6cf0894ba47370492d853a36c024d (patch)
tree50b103baec013524704188718b2c46433ce4ce10 /remote.h
parentecc3e5342de203fa2d84c4a49a46aaa87289534b (diff)
downloadgit-ff473221b4d6cf0894ba47370492d853a36c024d.zip
git-ff473221b4d6cf0894ba47370492d853a36c024d.tar.gz
git-ff473221b4d6cf0894ba47370492d853a36c024d.tar.bz2
ls-remote: send server options when using protocol v2
Teach ls-remote 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 querying for the remote end's refs 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 <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/remote.h b/remote.h
index 2b3180f..93dd97e 100644
--- a/remote.h
+++ b/remote.h
@@ -153,6 +153,7 @@ void free_refs(struct ref *ref);
struct oid_array;
struct packet_reader;
struct argv_array;
+struct string_list;
extern struct ref **get_remote_heads(struct packet_reader *reader,
struct ref **list, unsigned int flags,
struct oid_array *extra_have,
@@ -161,7 +162,8 @@ extern struct ref **get_remote_heads(struct packet_reader *reader,
/* Used for protocol v2 in order to retrieve refs from a remote */
extern struct ref **get_remote_refs(int fd_out, struct packet_reader *reader,
struct ref **list, int for_push,
- const struct argv_array *ref_prefixes);
+ const struct argv_array *ref_prefixes,
+ const struct string_list *server_options);
int resolve_remote_symref(struct ref *ref, struct ref *list);
int ref_newer(const struct object_id *new_oid, const struct object_id *old_oid);