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

Re: [PATCH] fetch-pack: optionally save packs to disk

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 11, 2015, 19:33 UTC
Message-ID
<xmqq8ubqf3b6.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1434044676-2942-1-git-send-email-augie@google.com>
Augie Fackler <augie@google.com> writes:
Show 5 quoted lines
> @@ -708,9 +708,8 @@ static int get_pack(struct fetch_pack_args *args,
>  	cmd.argv = argv;
>  	av = argv;
>  	*hdr_arg = 0;
> +	struct pack_header header;
decl-after-stmt here...
Show 18 quoted lines
>  	if (!args->keep_pack && unpack_limit) {
> -		struct pack_header header;
> -
>  		if (read_pack_header(demux.out, &header))
>  			die("protocol error: bad pack header");
>  		snprintf(hdr_arg, sizeof(hdr_arg),
> @@ -762,7 +761,44 @@ static int get_pack(struct fetch_pack_args *args,
>  		*av++ = "--strict";
>  	*av++ = NULL;
>  
> -	cmd.in = demux.out;
> +	savepath = getenv("GIT_SAVE_FETCHED_PACK_TO");
> +	if (savepath) {
> +		struct child_process cmd2 = CHILD_PROCESS_INIT;
> +		const char *argv2[22];
> +		int pipefds[2];
> +		int e;
> +		const char **av2;
Have a blank after decl block before the first statement here.
> +		cmd2.argv = argv2;
> +		av2 = argv2;
Previous: Stefan Beller
Message 3 of 3 in “fetch-pack: optionally save packs to disk”
  1. fetch-pack: optionally save packs to diskAugie Fackler, Jun 11, 2015
  2. Stefan BellerJun 11, 2015
  3. Junio C HamanoJun 11, 2015

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.