Thread (3 messages) 3 messages, 2 authors, 2016-06-15

Re: [PATCH 14/17] http*: add http_get_info_packs

From: Clemens Buchacher <hidden>
Date: 2016-06-15 22:46:53

On Sat, May 30, 2009 at 01:59:37AM +0800, Tay Ray Chuan wrote:
quoted hunk ↗ jump to hunk
--- a/http-push.c
+++ b/http-push.c
@@ -950,182 +950,16 @@ static int add_send_request(struct object *obj, struct remote_lock *lock)
[...]
 static int fetch_indices(void)
 {
[...]
-		if (results.curl_result != CURLE_OK) {
-			strbuf_release(&buffer);
-			free(url);
-			if (results.http_code == 404)
-				return 0;
-			else
-				return error("%s", curl_errorstr);
-		}
[...]
+	if (http_get_info_packs(repo->url, &repo->packs) == HTTP_OK)
+		return 0;
+	else
+		return -1;
fetch_indices() used to return 0 if the pack info was missing. Now it
returns an error. I also think we could get rid of repo->has_info_packs.
This could easily be handled within fetch_indices().

Clemens
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help