test format-patch -s: make sure MIME content type is shown as needed
[gitweb.git] / git-ls-remote.sh
index b7e5d0458470248e65da0893b8b9bb4ced9152da..fec70bbf88c614a2dadfc40950fdd7abdf7f2c63 100755 (executable)
@@ -13,7 +13,7 @@ die () {
 }
 
 exec=
-while case "$#" in 0) break;; esac
+while test $# != 0
 do
   case "$1" in
   -h|--h|--he|--hea|--head|--heads)
@@ -54,9 +54,10 @@ tmpdir=$tmp-d
 
 case "$peek_repo" in
 http://* | https://* | ftp://* )
-        if [ -n "$GIT_SSL_NO_VERIFY" ]; then
-            curl_extra_args="-k"
-        fi
+       if [ -n "$GIT_SSL_NO_VERIFY" -o \
+               "`git config --bool http.sslVerify`" = false ]; then
+               curl_extra_args="-k"
+       fi
        if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
                "`git config --bool http.noEPSV`" = true ]; then
                curl_extra_args="${curl_extra_args} --disable-epsv"