summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-28 21:33:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-09-28 21:33:27 (GMT)
commitdf37727a65c87cf9bba35befca1255031649553f (patch)
tree1b94b1eff66ebbc258722f59b60ca64eac0c6de3 /git-submodule.sh
parentecad27cf98c391d5cfdc26ce0e442e02347baad0 (diff)
parent33cfccbbf35a56e190b79bdec5c85457c952a021 (diff)
downloadgit-df37727a65c87cf9bba35befca1255031649553f.zip
git-df37727a65c87cf9bba35befca1255031649553f.tar.gz
git-df37727a65c87cf9bba35befca1255031649553f.tar.bz2
Merge branch 'jk/transfer-limit-protocol' into maint-2.3
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 36797c3..78c2740 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=