diff options
Diffstat (limited to 'transport.h')
-rw-r--r-- | transport.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/transport.h b/transport.h index 02ea248db1..8ebaaf2cae 100644 --- a/transport.h +++ b/transport.h @@ -74,15 +74,15 @@ struct transport { /** * Push the objects and refs. Send the necessary objects, and * then, for any refs where peer_ref is set and - * peer_ref->new_sha1 is different from old_sha1, tell the - * remote side to update each ref in the list from old_sha1 to - * peer_ref->new_sha1. + * peer_ref->new_oid is different from old_oid, tell the + * remote side to update each ref in the list from old_oid to + * peer_ref->new_oid. * * Where possible, set the status for each ref appropriately. * * The transport must modify new_sha1 in the ref to the new * value if the remote accepted the change. Note that this - * could be a different value from peer_ref->new_sha1 if the + * could be a different value from peer_ref->new_oid if the * process involved generating new commits. **/ int (*push_refs)(struct transport *transport, struct ref *refs, int flags); @@ -123,6 +123,9 @@ 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_ALWAYS 2048 +#define TRANSPORT_PUSH_CERT_IF_ASKED 4096 +#define TRANSPORT_PUSH_ATOMIC 8192 #define TRANSPORT_SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3) #define TRANSPORT_SUMMARY(x) (int)(TRANSPORT_SUMMARY_WIDTH + strlen(x) - gettext_width(x)), (x) @@ -130,6 +133,24 @@ struct transport { /* Returns a transport suitable for the url */ struct transport *transport_get(struct remote *, const char *); +/* + * Check whether a transport is allowed by the environment. Type should + * generally be the URL scheme, as described in Documentation/git.txt + */ +int is_transport_allowed(const char *type); + +/* + * Check whether a transport is allowed by the environment, + * and die otherwise. + */ +void transport_check_allowed(const char *type); + +/* + * Returns true if the user has attempted to turn on protocol + * restrictions at all. + */ +int transport_restrict_protocols(void); + /* Transport options which apply to git:// and scp-style URLs */ /* The program to use on the remote side to send a pack */ @@ -156,6 +177,9 @@ struct transport *transport_get(struct remote *, const char *); /* 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. |