aboutsummaryrefslogtreecommitdiffstats
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-27 00:11:41 -0800
committerJunio C Hamano <gitster@pobox.com>2016-12-27 00:11:41 -0800
commit9d540e97267fa94d9701d3e1aa5cdf2926858472 (patch)
tree692790eca6a1f1ed5dd56a0f336bf910e76d15e5 /git-submodule.sh
parent05f6e1be8cdae1ebedf3cf7b7a072a3b35f945b5 (diff)
parentabcbdc03895ff3f00280e54af11fee92d6877044 (diff)
downloadgit-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 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index a024a135d6..0a477b4c97 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -21,14 +21,10 @@ require_work_tree
wt_prefix=$(git rev-parse --show-prefix)
cd_to_toplevel
-# Restrict ourselves to a vanilla subset of protocols; the URLs
-# we get are under control of a remote repository, and we do not
-# want them kicking off arbitrary git-remote-* programs.
-#
-# If the user has already specified a set of allowed protocols,
-# we assume they know what they're doing and use that instead.
-: ${GIT_ALLOW_PROTOCOL=file:git:http:https:ssh}
-export GIT_ALLOW_PROTOCOL
+# Tell the rest of git that any URLs we get don't come
+# directly from the user, so it can apply policy as appropriate.
+GIT_PROTOCOL_FROM_USER=0
+export GIT_PROTOCOL_FROM_USER
command=
branch=