From: Nick Hengeveld Date: Fri, 18 Nov 2005 19:03:11 +0000 (-0800) Subject: Improve pack list response handling X-Git-Tag: v0.99.9k^2~65 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5e3a769186bc41f94c1970579f96f3b68b046ed6;p=git.git Improve pack list response handling Better response handling for pack list requests - a 404 means we do have the list but it happens to be empty. Signed-off-by: Nick Hengeveld Signed-off-by: Junio C Hamano --- diff --git a/http-fetch.c b/http-fetch.c index 53a7dbf4..43531734 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -637,10 +637,18 @@ static int fetch_indices(struct alt_base *repo) if (start_active_slot(slot)) { run_active_slot(slot); if (slot->curl_result != CURLE_OK) { - free(buffer.buffer); - return error("%s", curl_errorstr); + if (slot->http_code == 404) { + repo->got_indices = 1; + free(buffer.buffer); + return 0; + } else { + repo->got_indices = 0; + free(buffer.buffer); + return error("%s", curl_errorstr); + } } } else { + repo->got_indices = 0; free(buffer.buffer); return error("Unable to start request"); }