Subject: Re: [PATCH] HTTP partial transfer support for object, pack, and index transfers

From: Nick Hengeveld <[email-masked]>
Date: Fri, 30 Sep 2005 16:27:47 -0700

On Fri, Sep 30, 2005 at 12:47:30AM -0700, Junio C Hamano wrote:

> I took a look at this patch.  It did not cleanly apply anymore,
> but I merged it anyway, and then took the liberty of updating it
> further, according to your response to my earlier comments.

Sorry about that - we're actually using git as a back end to a content
distribution system, so I'm still learning the finer points of using it
for source control...

> They will appear near the tip of the proposed updates branch.
> I'd appreciate it if you could check it out and see I did not
> break things by mistake.

I've included a patch that fixes one small problem; I've tested partial
transfers of packs and objects with this applied and it looks good.

Don't unlink the temp file when an object transfer fails, so next attempt
will pick up where the failed transfer left off

Signed-off-by: Nick Hengeveld <[email-masked]>

---

 http-fetch.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

22226e509b916958a8b7aae76945c08d15ec686a
diff --git a/http-fetch.c b/http-fetch.c
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -550,7 +550,6 @@ static int fetch_object(struct alt_base 
 	curl_result = curl_easy_perform(curl);
 	curl_easy_setopt(curl, CURLOPT_HTTPHEADER, no_range_header);
 	if (curl_result != 0) {
-		unlink(tmpfile);
 		return error("%s", curl_errorstr);
 	}