Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'transport.h')
-rw-r--r--transport.h42
1 files changed, 37 insertions, 5 deletions
diff --git a/transport.h b/transport.h
index 3c68d73b21..7a9a7fcaf3 100644
--- a/transport.h
+++ b/transport.h
@@ -18,6 +18,17 @@ struct git_transport_options {
unsigned deepen_relative : 1;
unsigned from_promisor : 1;
unsigned no_dependents : 1;
+
+ /*
+ * If this transport supports connect or stateless-connect,
+ * the corresponding field in struct fetch_pack_args is copied
+ * here after fetching.
+ *
+ * See the definition of connectivity_checked in struct
+ * fetch_pack_args for more information.
+ */
+ unsigned connectivity_checked:1;
+
int depth;
const char *deepen_since;
const struct string_list *deepen_not;
@@ -60,11 +71,23 @@ struct transport {
unsigned cloning : 1;
/*
+ * Indicates that the transport is connected via a half-duplex
+ * connection and should operate in stateless-rpc mode.
+ */
+ unsigned stateless_rpc : 1;
+
+ /*
* These strings will be passed to the {pre, post}-receive hook,
* on the remote side, if both sides support the push options capability.
*/
const struct string_list *push_options;
+ /*
+ * These strings will be passed to the remote side on each command
+ * request, if both sides support the server-option capability.
+ */
+ const struct string_list *server_options;
+
char *pack_lockfile;
signed verbose : 3;
/**
@@ -191,12 +214,23 @@ void transport_set_verbosity(struct transport *transport, int verbosity,
#define REJECT_NEEDS_FORCE 0x10
int transport_push(struct transport *connection,
- int refspec_nr, const char **refspec, int flags,
+ struct refspec *rs, int flags,
unsigned int * reject_reasons);
-const struct ref *transport_get_remote_refs(struct transport *transport);
+/*
+ * 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 argv_array *ref_prefixes);
-int transport_fetch_refs(struct transport *transport, struct ref *refs);
+int transport_fetch_refs(struct transport *transport, struct ref *refs,
+ struct ref **fetched_refs);
void transport_unlock_pack(struct transport *transport);
int transport_disconnect(struct transport *transport);
char *transport_anonymize_url(const char *url);
@@ -211,8 +245,6 @@ int transport_helper_init(struct transport *transport, const char *name);
int bidirectional_transfer_loop(int input, int output);
/* common methods used by transport.c and builtin/send-pack.c */
-void transport_verify_remote_names(int nr_heads, const char **heads);
-
void transport_update_tracking_ref(struct remote *remote, struct ref *ref, int verbose);
int transport_refs_pushed(struct ref *ref);