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

Re: [PATCH 1/2] Reduce the number of connects when fetching

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 5, 2008, 03:09 UTC
Message-ID
<7v8x20gkue.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LNX.1.00.0802041323450.13593@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
> This shares the connection between getting the remote ref list and
> getting objects in the first batch. (A second connection is still used
> to follow tags)
> ---
No signoff.
> There's a bug here, fixed in the next patch, but it's just cosmetic (we 
> hang up on the remote end unexpectedly if we turn out not to need 
> anything), and I think reorganizing changes to not do that makes the 
> changes harder to follow.
Show 8 quoted lines
> @@ -706,9 +703,34 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
>  	if (!dest)
>  		usage(fetch_pack_usage);
>  
> -	ref = fetch_pack(&args, dest, nr_heads, heads, NULL);
> +	int fd[2];
> +	struct child_process *conn = git_connect(fd, (char *)dest, args.uploadpack,
> +                          args.verbose ? CONNECT_VERBOSE : 0);
Decl after statement.

But other than that, good job. I did not realize it would be doable this cleanly.

Will squash all three and queue for 'next'.
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 2 of 3 in “Reduce the number of connects when fetching”
  1. 1/2 Reduce the number of connects when fetchingDaniel Barkalow, Feb 4, 2008
  2. Junio C HamanoFeb 5, 2008
  3. Daniel BarkalowFeb 5, 2008

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.