git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
NHNick Hengeveld <nickh@reactrix.com>
Date
Sep 30, 2005, 23:27 UTC
Message-ID
<20050930232747.GB15593@reactrix.com>
In-Reply-To
<7vk6gz6lpp.fsf@assigned-by-dhcp.cox.net>
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 <nickh@reactrix.com>
---
 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);
 	}
 
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “HTTP partial transfer support for object, pack, and index transfers”
  1. HTTP partial transfer support for object, pack, and index transfersNick Hengeveld, Sep 28, 2005
  2. Junio C HamanoSep 30, 2005
  3. Nick HengeveldSep 30, 2005
  4. Junio C HamanoOct 1, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.