summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ac3a61)
raw | patch | inline | side by side (parent: 8ac3a61)
author | Petr Baudis <pasky@suse.cz> | |
Fri, 21 Oct 2005 16:18:46 +0000 (18:18 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 23 Oct 2005 18:49:25 +0000 (11:49 -0700) |
git-http-fetch spits out curl 404 error message when unable to fetch an object,
but that's confusing since no error really happened and the object is usually
found in a pack it tries right after that. And if the object still cannot be
retrieved, it will say another error message anyway. OTOH other HTTP errors
(403 etc) are likely fatal and the user should be still informed about them.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
but that's confusing since no error really happened and the object is usually
found in a pack it tries right after that. And if the object still cannot be
retrieved, it will say another error message anyway. OTOH other HTTP errors
(403 etc) are likely fatal and the user should be still informed about them.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-fetch.c | patch | blob | history |
diff --git a/http-fetch.c b/http-fetch.c
index 1ee1df20d6b2824e987207ebb8f847e880de358b..a1b03cd9c842e9daa8f743939d4382faac0c534f 100644 (file)
--- a/http-fetch.c
+++ b/http-fetch.c
}
if (request->curl_result != CURLE_OK && request->http_code != 416) {
- ret = error("%s (curl_result = %d, http_code = %ld, sha1 = %s)",
- request->errorstr, request->curl_result,
- request->http_code, hex);
+ if (request->http_code == 404)
+ ret = -1; /* Be silent, it is probably in a pack. */
+ else
+ ret = error("%s (curl_result = %d, http_code = %ld, sha1 = %s)",
+ request->errorstr, request->curl_result,
+ request->http_code, hex);
release_request(request);
return ret;
}