checkout: relocate --to's "no branch specified" check
[gitweb.git] / transport.h
index b3679bbdc787dcabca09fc801834c3d7f13fc34f..3e0091eaabe406759005bc24ce2ff39144caa72d 100644 (file)
@@ -11,6 +11,8 @@ struct git_transport_options {
        unsigned followtags : 1;
        unsigned check_self_contained_and_connected : 1;
        unsigned self_contained_and_connected : 1;
+       unsigned update_shallow : 1;
+       unsigned push_cert : 1;
        int depth;
        const char *uploadpack;
        const char *receivepack;
@@ -35,6 +37,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
@@ -116,6 +124,7 @@ struct transport {
 #define TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND 256
 #define TRANSPORT_PUSH_NO_HOOK 512
 #define TRANSPORT_PUSH_FOLLOW_TAGS 1024
+#define TRANSPORT_PUSH_CERT 2048
 
 #define TRANSPORT_SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
 #define TRANSPORT_SUMMARY(x) (int)(TRANSPORT_SUMMARY_WIDTH + strlen(x) - gettext_width(x)), (x)
@@ -146,6 +155,12 @@ 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"
+
+/* Send push certificates */
+#define TRANS_OPT_PUSH_CERT "pushcert"
+
 /**
  * Returns 0 if the option was used, non-zero otherwise. Prints a
  * message to stderr if the option is not used.