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

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.

Previous: Johannes SixtNext: Johannes Sixt
Message 17 of 30 in “fork/exec removal series”
  1. 0/5 fork/exec removal seriesJohannes Sixt, Sep 30, 2007
  2. 1/5 Change git_connect() to return a struct child_process instead of a pid_t.Johannes Sixt, Sep 30, 2007
  3. 2/5 Use start_command() in git_connect() instead of explicit fork/exec.Johannes Sixt, Sep 30, 2007
  4. 3/5 Use start_command() to run the filter instead of explicit fork/exec.Johannes Sixt, Sep 30, 2007
  5. 4/5 Use run_command() to spawn external diff programs instead of fork/exec.Johannes Sixt, Sep 30, 2007
  6. 5/5 Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec.Johannes Sixt, Sep 30, 2007
  7. Johannes SchindelinSep 30, 2007
  8. Johannes SchindelinSep 30, 2007
  9. Junio C HamanoSep 30, 2007
  10. Johannes SixtSep 30, 2007
  11. 0/5 fork/exec removal seriesJohannes Sixt, Oct 3, 2007
  12. 1/5 Change git_connect() to return a struct child_process instead of a pid_t.Johannes Sixt, Oct 3, 2007
  13. 2/5 Use start_command() in git_connect() instead of explicit fork/exec.Johannes Sixt, Oct 3, 2007
  14. 3/5 Use start_command() to run the filter instead of explicit fork/exec.Johannes Sixt, Oct 3, 2007
  15. 4/5 Use run_command() to spawn external diff programs instead of fork/exec.Johannes Sixt, Oct 3, 2007
  16. 5/5 Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec.Johannes Sixt, Oct 3, 2007
  17. Junio C HamanoOct 4, 2007
  18. Johannes SixtOct 4, 2007
  19. Johannes SixtOct 4, 2007
  20. Johannes SixtOct 1, 2007
  21. Junio C HamanoOct 1, 2007
  22. Johannes SixtOct 1, 2007
  23. Junio C HamanoOct 2, 2007
  24. Johannes SchindelinSep 30, 2007
  25. Junio C HamanoSep 30, 2007
  26. Johannes SchindelinSep 30, 2007
  27. Johannes SixtSep 30, 2007
  28. Johannes SchindelinSep 30, 2007
  29. Johannes SixtOct 1, 2007
  30. David KastrupOct 1, 2007

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.