]> git.ipfire.org Git - thirdparty/git.git/blobdiff - transport.h
fetch: add --update-shallow to accept refs that update .git/shallow
[thirdparty/git.git] / transport.h
index 8f96bed775e720043658169b46f70e192cf76b41..02ea248db18a558674825384a5d2678a45483873 100644 (file)
@@ -11,6 +11,7 @@ struct git_transport_options {
        unsigned followtags : 1;
        unsigned check_self_contained_and_connected : 1;
        unsigned self_contained_and_connected : 1;
+       unsigned update_shallow : 1;
        int depth;
        const char *uploadpack;
        const char *receivepack;
@@ -35,6 +36,12 @@ struct transport {
         */
        unsigned cannot_reuse : 1;
 
+       /*
+        * A hint from caller that it will be performing a clone, not
+        * normal fetch. IOW the repository is guaranteed empty.
+        */
+       unsigned cloning : 1;
+
        /**
         * Returns 0 if successful, positive if the option is not
         * recognized or is inapplicable, and negative if the option
@@ -146,6 +153,9 @@ struct transport *transport_get(struct remote *, const char *);
 /* Aggressively fetch annotated tags if possible */
 #define TRANS_OPT_FOLLOWTAGS "followtags"
 
+/* Accept refs that may update .git/shallow without --depth */
+#define TRANS_OPT_UPDATE_SHALLOW "updateshallow"
+
 /**
  * Returns 0 if the option was used, non-zero otherwise. Prints a
  * message to stderr if the option is not used.
@@ -193,10 +203,4 @@ void transport_print_push_status(const char *dest, struct ref *refs,
 
 typedef void alternate_ref_fn(const struct ref *, void *);
 extern void for_each_alternate_ref(alternate_ref_fn, void *);
-
-struct send_pack_args;
-extern int send_pack(struct send_pack_args *args,
-                    int fd[], struct child_process *conn,
-                    struct ref *remote_refs,
-                    struct extra_have_objects *extra_have);
 #endif