Re: [PATCH 5/5] Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 4, 2007, 08:55 UTC
- Message-ID
- <7v8x6jb6of.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1191442180-15905-6-git-send-email-johannes.sixt@telecom.at>
Johannes Sixt <johannes.sixt@telecom.at> writes:
Show 22 quoted lines
> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
> ---
> fetch-pack.c | 35 ++++++++++-------------------------
> 1 files changed, 10 insertions(+), 25 deletions(-)
>
> diff --git a/fetch-pack.c b/fetch-pack.c
> index d06b5ec..80268e1 100644
> --- a/fetch-pack.c
> +++ b/fetch-pack.c
> @@ -502,9 +503,12 @@ static int get_pack(int xd[2])
> char hdr_arg[256];
> const char **av;
> int do_keep = keep_pack;
> + struct child_process cmd;
>
> side_pid = setup_sideband(fd, xd);
>
> + memset(&cmd, 0, sizeof(cmd));
> + cmd.argv = argv;
> av = argv;
> *hdr_arg = 0;
> if (unpack_limit) {Your patch to this function makes status and pid unused variables, which I've fixed up locally.
The tip of your topic is currently queued to the tip of 'pu'; there were quite severe merge conflicts (textual conflicts in builtin-fetch-pack.c, and adjustment to transport.c for semantics change was also needed), so I ended up doing an evil merge there, which I am not very happy about.
I suspect the evil-merge's changes to builtin-fetch-pack to handle the connection to the index-pack process may be quite busted, but I ran out of time. Please check if the result makes sense, Ok?
I think Daniel and Shawn's git-fetch-in-C should graduate 'master' before this series. If you can re-send the series rebased on 2b5a06edca8f7237aad6464b349b79772024d2a2 (Restore default verbosity for http fetches.), it would be much appreciated.