summaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-13 20:30:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-13 20:30:39 (GMT)
commitbd33a29283819f1eb1b9ddcb3f1a22c268af8679 (patch)
treef930e9e156b38ceef4ac3bdccb5cc29ff797461f /transport.h
parentdc96c5ee703fb7265619b1ecb2b5f2c5ab3ef40d (diff)
parent27a557a9ff9273ad47aa29c52e9903cf6405f7f7 (diff)
downloadgit-bd33a29283819f1eb1b9ddcb3f1a22c268af8679.zip
git-bd33a29283819f1eb1b9ddcb3f1a22c268af8679.tar.gz
git-bd33a29283819f1eb1b9ddcb3f1a22c268af8679.tar.bz2
Merge branch 'il/vcs-helper'
* il/vcs-helper: Reset possible helper before reusing remote structure Remove special casing of http, https and ftp Support remote archive from all smart transports Support remote helpers implementing smart transports Support taking over transports Refactor git transport options parsing Pass unknown protocols to external protocol handlers Support mandatory capabilities Add remote helper debug mode Conflicts: Documentation/git-remote-helpers.txt transport-helper.c
Diffstat (limited to 'transport.h')
-rw-r--r--transport.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/transport.h b/transport.h
index 9e74406..97ba251 100644
--- a/transport.h
+++ b/transport.h
@@ -4,6 +4,15 @@
#include "cache.h"
#include "remote.h"
+struct git_transport_options {
+ unsigned thin : 1;
+ unsigned keep : 1;
+ unsigned followtags : 1;
+ int depth;
+ const char *uploadpack;
+ const char *receivepack;
+};
+
struct transport {
struct remote *remote;
const char *url;
@@ -55,6 +64,8 @@ struct transport {
**/
int (*push_refs)(struct transport *transport, struct ref *refs, int flags);
int (*push)(struct transport *connection, int refspec_nr, const char **refspec, int flags);
+ int (*connect)(struct transport *connection, const char *name,
+ const char *executable, int fd[2]);
/** get_refs_list(), fetch(), and push_refs() can keep
* resources (such as a connection) reserved for futher
@@ -65,6 +76,12 @@ struct transport {
signed verbose : 3;
/* Force progress even if the output is not a tty */
unsigned progress : 1;
+ /*
+ * If transport is at least potentially smart, this points to
+ * git_transport_options structure to use in case transport
+ * actually turns out to be smart.
+ */
+ struct git_transport_options *smart_options;
};
#define TRANSPORT_PUSH_ALL 1
@@ -115,6 +132,11 @@ int transport_fetch_refs(struct transport *transport, struct ref *refs);
void transport_unlock_pack(struct transport *transport);
int transport_disconnect(struct transport *transport);
char *transport_anonymize_url(const char *url);
+void transport_take_over(struct transport *transport,
+ struct child_process *child);
+
+int transport_connect(struct transport *transport, const char *name,
+ const char *exec, int fd[2]);
/* Transport methods defined outside transport.c */
int transport_helper_init(struct transport *transport, const char *name);