[PATCH] Make curl fail on server error

Some http servers return an HTML error page and git reads it as normal
data. Adding -f option makes curl fail silently.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Catalin Marinas
2005-08-08 10:53:23 +01:00
committed by Junio C Hamano
parent 3c4e8a636f
commit affa40d2f8
3 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ if [ -n "$GIT_SSL_NO_VERIFY" ]; then
fi
http_fetch () {
# $1 = Remote, $2 = Local
curl -ns $curl_extra_args "$1" >"$2"
curl -nsf $curl_extra_args "$1" >"$2"
}
cd "$D" &&