Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@gmail.com>2005-08-08 13:53:23 +0400
committerJunio C Hamano <junkio@cox.net>2005-08-09 09:51:44 +0400
commitaffa40d2f8c5e72af5896cf395ef77d4162908cd (patch)
tree572d4ab7df2134b99851c86d518ee9947abcc28e /git-fetch-script
parent3c4e8a636f4de3668b24d0020df731cdc78ae6e9 (diff)
[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 a0326f0e78..24f0a5ec82 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