]> git.ipfire.org Git - thirdparty/git.git/blobdiff - transport.h
fetch-pack: support more than one pack lockfile
[thirdparty/git.git] / transport.h
index f2ee7c4f499a0937ba4c7148db045665fcb7e4cf..05efa72db194e7526f8a5887b8ffeb19c86c91d5 100644 (file)
@@ -5,8 +5,7 @@
 #include "run-command.h"
 #include "remote.h"
 #include "list-objects-filter-options.h"
-
-struct string_list;
+#include "string-list.h"
 
 struct git_transport_options {
        unsigned thin : 1;
@@ -98,7 +97,8 @@ struct transport {
         */
        const struct string_list *server_options;
 
-       char *pack_lockfile;
+       struct string_list pack_lockfiles;
+
        signed verbose : 3;
        /**
         * Transports should not set this directly, and should use this
@@ -134,7 +134,7 @@ struct transport {
 #define TRANSPORT_PUSH_OPTIONS                 (1<<14)
 #define TRANSPORT_RECURSE_SUBMODULES_ONLY      (1<<15)
 
-extern int transport_summary_width(const struct ref *refs);
+int transport_summary_width(const struct ref *refs);
 
 /* Returns a transport suitable for the url */
 struct transport *transport_get(struct remote *, const char *);
@@ -208,6 +208,9 @@ void transport_check_allowed(const char *type);
 /* Filter objects for partial clone and fetch */
 #define TRANS_OPT_LIST_OBJECTS_FILTER "filter"
 
+/* Request atomic (all-or-nothing) updates when pushing */
+#define TRANS_OPT_ATOMIC "atomic"
+
 /**
  * Returns 0 if the option was used, non-zero otherwise. Prints a
  * message to stderr if the option is not used.
@@ -262,6 +265,7 @@ int transport_refs_pushed(struct ref *ref);
 void transport_print_push_status(const char *dest, struct ref *refs,
                  int verbose, int porcelain, unsigned int *reject_reasons);
 
-typedef void alternate_ref_fn(const struct object_id *oid, void *);
-extern void for_each_alternate_ref(alternate_ref_fn, void *);
+/* common method used by transport-helper.c and send-pack.c */
+void reject_atomic_push(struct ref *refs, int mirror_mode);
+
 #endif