diff options
author | Sasha Khapyorsky <sashak@voltaire.com> | 2006-09-29 03:10:44 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-28 19:02:46 -0700 |
commit | 3ea099d48b15f69889f4efe71599c9dfde6bb26a (patch) | |
tree | a9ad5a1e8038a6ab2300876eae9e940752483792 /git-clone.sh | |
parent | 77e565d8f76357781eb6236e031e8e0581de83a9 (diff) | |
download | git-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-clone.sh')
-rwxr-xr-x | git-clone.sh | 4 |
1 files changed, 4 insertions, 0 deletions
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?" |