summaryrefslogtreecommitdiff
path: root/git-fetch-script
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@gmail.com>2005-08-08 09:53:23 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-09 05:51:44 (GMT)
commitaffa40d2f8c5e72af5896cf395ef77d4162908cd (patch)
tree572d4ab7df2134b99851c86d518ee9947abcc28e /git-fetch-script
parent3c4e8a636f4de3668b24d0020df731cdc78ae6e9 (diff)
downloadgit-affa40d2f8c5e72af5896cf395ef77d4162908cd.zip
git-affa40d2f8c5e72af5896cf395ef77d4162908cd.tar.gz
git-affa40d2f8c5e72af5896cf395ef77d4162908cd.tar.bz2
[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>
Diffstat (limited to 'git-fetch-script')
-rwxr-xr-xgit-fetch-script2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-fetch-script b/git-fetch-script
index a0326f0..24f0a5e 100755
--- a/git-fetch-script
+++ b/git-fetch-script
@@ -15,7 +15,7 @@ http://* | https://*)
fi
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' &&
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" &&
- head=$(curl -ns $curl_extra_args "$merge_repo/$merge_head") &&
+ head=$(curl -nsf $curl_extra_args "$merge_repo/$merge_head") &&
expr "$head" : "$_x40\$" >/dev/null || {
echo >&2 "Failed to fetch $merge_head from $merge_repo"
exit 1