summaryrefslogtreecommitdiff
path: root/git-ls-remote.sh
diff options
context:
space:
mode:
authorSasha Khapyorsky <sashak@voltaire.com>2006-09-29 00:10:44 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-09-29 02:02:46 (GMT)
commit3ea099d48b15f69889f4efe71599c9dfde6bb26a (patch)
treea9ad5a1e8038a6ab2300876eae9e940752483792 /git-ls-remote.sh
parent77e565d8f76357781eb6236e031e8e0581de83a9 (diff)
downloadgit-3ea099d48b15f69889f4efe71599c9dfde6bb26a.zip
git-3ea099d48b15f69889f4efe71599c9dfde6bb26a.tar.gz
git-3ea099d48b15f69889f4efe71599c9dfde6bb26a.tar.bz2
http/ftp: optionally ask curl to not use EPSV command
If http.noEPSV config variable is defined and true, or if GIT_CURL_FTP_NO_EPSV environment variable is defined, disable using of EPSV ftp command (PASV will be used instead). This is helpful with some "poor" ftp servers which does not support EPSV mode. Signed-off-by: Sasha Khapyorsky <sashak@voltaire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-ls-remote.sh')
-rwxr-xr-xgit-ls-remote.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-ls-remote.sh b/git-ls-remote.sh
index 2c0b521..0f88953 100755
--- a/git-ls-remote.sh
+++ b/git-ls-remote.sh
@@ -53,6 +53,10 @@ http://* | https://* | ftp://* )
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
curl_extra_args="-k"
fi
+ if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
+ "`git-repo-config --bool http.noEPSV`" = true ]; then
+ curl_extra_args="${curl_extra_args} --disable-epsv"
+ fi
curl -nsf $curl_extra_args --header "Pragma: no-cache" "$peek_repo/info/refs" ||
echo "failed slurping"
;;