summaryrefslogtreecommitdiff
path: root/git-ls-remote.sh
diff options
context:
space:
mode:
authorSasha Khapyorsky <sashak@voltaire.com>2006-09-29 03:10:44 +0300
committerJunio C Hamano <junkio@cox.net>2006-09-28 19:02:46 -0700
commit3ea099d48b15f69889f4efe71599c9dfde6bb26a (patch)
treea9ad5a1e8038a6ab2300876eae9e940752483792 /git-ls-remote.sh
parent77e565d8f76357781eb6236e031e8e0581de83a9 (diff)
downloadgit-3ea099d48b15f69889f4efe71599c9dfde6bb26a.tar.gz
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 2c0b52122f..0f88953f29 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"
;;