From: Clemens Buchacher Date: Sun, 31 May 2009 15:02:56 GMT Subject: Re: [PATCH 14/17] http*: add http_get_info_packs Message-ID: <20090531150256.GA27958@localhost> In-Reply-To: <20090530015937.c402e5f2.rctay89@gmail.com> On Sat, May 30, 2009 at 01:59:37AM +0800, Tay Ray Chuan wrote: > --- 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