From 3ea099d48b15f69889f4efe71599c9dfde6bb26a Mon Sep 17 00:00:00 2001 From: Sasha Khapyorsky Date: Fri, 29 Sep 2006 03:10:44 +0300 Subject: 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 Signed-off-by: Junio C Hamano --- git-clone.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'git-clone.sh') diff --git a/git-clone.sh b/git-clone.sh index e1b3bf382f..3998c55cef 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -31,6 +31,10 @@ clone_dumb_http () { cd "$2" && clone_tmp="$GIT_DIR/clone-tmp" && mkdir -p "$clone_tmp" || exit 1 + 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 http_fetch "$1/info/refs" "$clone_tmp/refs" || { echo >&2 "Cannot get remote repository information. Perhaps git-update-server-info needs to be run there?" -- cgit v1.2.3