@matheusbsbs / matheus-bagliano / commits / 1c1f79a1e4
Fork 0

honor the http.sslVerify option in shell scripts

Signed-off-by: Aurélien Bompard <aurelien@bompard.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Aurelien Bompard committed Oct 28, 2007 at 18:47 UTC 1c1f79a1e44547d039e7bf94d9aaadd3fae007d1
2 files changed +6 -4
git-clone.sh
+2 -1
@@ -28,7 +28,8 @@ get_repo_base() {
28 ) 2>/dev/null
29 }
30
31 -if [ -n "$GIT_SSL_NO_VERIFY" ]; then
31 +if [ -n "$GIT_SSL_NO_VERIFY" -o \
32 + "`git config --bool http.sslVerify`" = false ]; then
33 curl_extra_args="-k"
34 fi
35
git-ls-remote.sh
+4 -3
@@ -54,9 +54,10 @@ tmpdir=$tmp-d
54
55 case "$peek_repo" in
56 http://* | https://* | ftp://* )
57 - if [ -n "$GIT_SSL_NO_VERIFY" ]; then
58 - curl_extra_args="-k"
59 - fi
57 + if [ -n "$GIT_SSL_NO_VERIFY" -o \
58 + "`git config --bool http.sslVerify`" = false ]; then
59 + curl_extra_args="-k"
60 + fi
61 if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
62 "`git config --bool http.noEPSV`" = true ]; then
63 curl_extra_args="${curl_extra_args} --disable-epsv"