Code

Merge branch 'mh/retag'
[git.git] / transport.h
index 6a95d6605342e2dd42b39bd38e87065e42541f74..2f80ab4b03df181dc8b041b1aace5832aa84deb1 100644 (file)
@@ -5,22 +5,11 @@
 #include "remote.h"
 
 struct transport {
-       unsigned verbose : 1;
        struct remote *remote;
        const char *url;
-
        void *data;
-
        struct ref *remote_refs;
 
-       const struct transport_ops *ops;
-       char *pack_lockfile;
-};
-
-#define TRANSPORT_PUSH_ALL 1
-#define TRANSPORT_PUSH_FORCE 2
-
-struct transport_ops {
        /**
         * Returns 0 if successful, positive if the option is not
         * recognized or is inapplicable, and negative if the option
@@ -34,8 +23,15 @@ struct transport_ops {
        int (*push)(struct transport *connection, int refspec_nr, const char **refspec, int flags);
 
        int (*disconnect)(struct transport *connection);
+       char *pack_lockfile;
+       signed verbose : 2;
 };
 
+#define TRANSPORT_PUSH_ALL 1
+#define TRANSPORT_PUSH_FORCE 2
+#define TRANSPORT_PUSH_DRY_RUN 4
+#define TRANSPORT_PUSH_VERBOSE 8
+
 /* Returns a transport suitable for the url */
 struct transport *transport_get(struct remote *, const char *);
 
@@ -53,9 +49,6 @@ struct transport *transport_get(struct remote *, const char *);
 /* Keep the pack that was transferred if not null */
 #define TRANS_OPT_KEEP "keep"
 
-/* Unpack the objects if fewer than this number of objects are fetched */
-#define TRANS_OPT_UNPACKLIMIT "unpacklimit"
-
 /* Limit the depth of the fetch if not null */
 #define TRANS_OPT_DEPTH "depth"