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

Re: [RFC] custom strategies in builtin-merge

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 26, 2008, 01:12 UTC
Message-ID
<7vvdyto3da.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0807260250480.11976@eeepc-johanness>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> ... especially since I hope that we have them builtin soon, and not only 
> that, but have builtin-merge call them as C functions, not with fork() and 
> exec().

Because builtin-merge.c does not directly use fork/exec but uses run_command() interface, non POSIX platforms can spawn subprocesses just fine, can't they?

I do not think at this point it is of any high priority to call strategies internally, avoiding fork/exec. We may apply hundreds of patches per minute, but would fork/exec overhead matter for merges?

Especially because some strategies (recursive and perhaps the rumored "blame" even more so) are quite data intensive operations, libifying them is not worth it, compared to the nice isolation between processes we get from running them as a separate program. We get the necessary clean-up after strategy did its thing for almost free (well, "at the cost of fork/exec").

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 5 of 6 in “[RFC] custom strategies in builtin-merge”
  1. Miklos VajnaJul 25, 2008
  2. Sverre RabbelierJul 25, 2008
  3. Junio C HamanoJul 26, 2008
  4. Johannes SchindelinJul 26, 2008
  5. Junio C HamanoJul 26, 2008
  6. Johannes SchindelinJul 26, 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.