summaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
Diffstat (limited to 'transport.h')
-rw-r--r--transport.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/transport.h b/transport.h
index 24558c027d..24e15799e7 100644
--- a/transport.h
+++ b/transport.h
@@ -233,17 +233,32 @@ 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;
+
+ /*
+ * If unborn_head_target is not NULL, and the remote reports HEAD as
+ * pointing to an unborn branch, transport_get_remote_refs() stores the
+ * unborn branch in unborn_head_target. It should be freed by the
+ * caller.
+ */
+ char *unborn_head_target;
+};
+#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.