From: Junio C Hamano Date: Thu, 11 Jun 2015 19:33:17 GMT Subject: Re: [PATCH] fetch-pack: optionally save packs to disk Message-ID: In-Reply-To: <1434044676-2942-1-git-send-email-augie@google.com> Augie Fackler writes: > @@ -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... > 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;