]> git.ipfire.org Git - thirdparty/git.git/blobdiff - transport.h
Merge branch 'ab/pager-exit-log'
[thirdparty/git.git] / transport.h
index 24558c027d61bba1dd99b17a1c9d1cd484b1cb8a..24e15799e714aeb53f725b161a14172202cbae7e 100644 (file)
@@ -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.