[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH 14/17] http*: add http_get_info_packs
From:       Clemens Buchacher <drizzd () aon ! at>
Date:       2009-05-31 15:02:56
Message-ID: 20090531150256.GA27958 () localhost
[Download RAW message or body]

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic