summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-05 19:46:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-05 20:20:08 (GMT)
commit590f6e4235a7d44ad39511186ca8bbac02ae8c2e (patch)
tree6999a9512d87bbc06dfb3308fdc824e5226e7597 /git-submodule.sh
parente13d854322ad802213aea13409505c765b5c68d1 (diff)
parent22f698cb188243b313e024d618283e0293e37140 (diff)
downloadgit-590f6e4235a7d44ad39511186ca8bbac02ae8c2e.zip
git-590f6e4235a7d44ad39511186ca8bbac02ae8c2e.tar.gz
git-590f6e4235a7d44ad39511186ca8bbac02ae8c2e.tar.bz2
Sync with 2.6.1
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 1ac321c..9bc5c5f 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -22,6 +22,15 @@ 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
+
command=
branch=
force=