diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-12-27 00:11:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-27 00:11:41 -0800 |
commit | 9d540e97267fa94d9701d3e1aa5cdf2926858472 (patch) | |
tree | 692790eca6a1f1ed5dd56a0f336bf910e76d15e5 /transport.h | |
parent | 05f6e1be8cdae1ebedf3cf7b7a072a3b35f945b5 (diff) | |
parent | abcbdc03895ff3f00280e54af11fee92d6877044 (diff) | |
download | git-9d540e97267fa94d9701d3e1aa5cdf2926858472.tar.gz |
Merge branch 'bw/transport-protocol-policy'
Finer-grained control of what protocols are allowed for transports
during clone/fetch/push have been enabled via a new configuration
mechanism.
* bw/transport-protocol-policy:
http: respect protocol.*.allow=user for http-alternates
transport: add from_user parameter to is_transport_allowed
http: create function to get curl allowed protocols
transport: add protocol policy config option
http: always warn if libcurl version is too old
lib-proto-disable: variable name fix
Diffstat (limited to 'transport.h')
-rw-r--r-- | transport.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/transport.h b/transport.h index b8e4ee8099..9820f10b8e 100644 --- a/transport.h +++ b/transport.h @@ -153,10 +153,17 @@ extern int transport_summary_width(const struct ref *refs); 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 + * Check whether a transport is allowed by the environment. + * + * Type should generally be the URL scheme, as described in + * Documentation/git.txt + * + * from_user specifies if the transport was given by the user. If unknown pass + * a -1 to read from the environment to determine if the transport was given by + * the user. + * */ -int is_transport_allowed(const char *type); +int is_transport_allowed(const char *type, int from_user); /* * Check whether a transport is allowed by the environment, @@ -164,12 +171,6 @@ int is_transport_allowed(const char *type); */ 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 */ |