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

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 25, 2016, 02:56 UTC
Message-ID
<xmqqziuppkf2.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160225005513.GP28749@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 31 quoted lines
> Stefan Beller wrote:
>> On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>> > Stefan Beller wrote:
>
>>>> When the callers of parallel processing machine are sloppy with their
>>>> messages, make sure the output is terminated with LF after one child
>>>> process is handled.
>>>
>>> Why not always add \n here?
>>
>> So you propose to always add a \n if the output length was > 0 ?
>
> Ah, now I see where I was confused.
> ...
> get_next_task_fn et al looked similar to that pattern, but they are
> doing something different.
> ...
> The functions default_start_failure and default_task_finished are
> buggy under that API, since they do not include newlines in their
> output.
>
> Once they're fixed, there wouldn't be any need to add \n, unless we
> are worried about a child process that writes output that doesn't end
> with a newline.  It can be convenient for child processes to do things
> like
>
> 	printf '%s\t' "some information"
>
> so I am not convinced this patch is helping.
>
> Does that make sense?
Sounds very sensible analysis.  Thanks.
Previous: Jonathan NiederNext: Stefan Beller
Message 10 of 13 in “[PATCHv15 0/5] Expose submodule parallelism to the user”
  1. Stefan BellerFeb 24, 2016
  2. 1/5 run-command: expose default_{start_failure, task_finished}Stefan Beller, Feb 24, 2016
  3. 2/5 run_processes_parallel: add LF when caller is sloppyStefan Beller, Feb 24, 2016
  4. Junio C HamanoFeb 24, 2016
  5. Stefan BellerFeb 24, 2016
  6. Junio C HamanoFeb 24, 2016
  7. Jonathan NiederFeb 24, 2016
  8. Stefan BellerFeb 24, 2016
  9. Jonathan NiederFeb 25, 2016
  10. Junio C HamanoFeb 25, 2016
  11. 3/5 git submodule update: have a dedicated helper for cloningStefan Beller, Feb 24, 2016
  12. 4/5 submodule update: expose parallelism to the userStefan Beller, Feb 24, 2016
  13. 5/5 clone: allow an explicit argument for parallel submodule clonesStefan Beller, Feb 24, 2016

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.