]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-clone.sh
Merge branch 'maint'
[git.git] / git-clone.sh
index 18003ab4b39ad0a7848cc20db2f6ad55e1291264..0ea3c24f59e32055e4d514e55fe3a6f6be095f9c 100755 (executable)
@@ -28,13 +28,18 @@ get_repo_base() {
        ) 2>/dev/null
 }
 
-if [ -n "$GIT_SSL_NO_VERIFY" ]; then
+if [ -n "$GIT_SSL_NO_VERIFY" -o \
+       "`git config --bool http.sslVerify`" = false ]; then
     curl_extra_args="-k"
 fi
 
 http_fetch () {
        # $1 = Remote, $2 = Local
-       curl -nsfL $curl_extra_args "$1" >"$2"
+       curl -nsfL $curl_extra_args "$1" >"$2" ||
+               case $? in
+               126|127) exit ;;
+               *)       return $? ;;
+               esac
 }
 
 clone_dumb_http () {