From: Stefan Beller <sbeller@google.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Jens Lehmann <Jens.Lehmann@web.de>, Jeff King <peff@peff.net>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy
Date: Wed, 24 Feb 2016 13:59:25 -0800 [thread overview]
Message-ID: <CAGZ79kZvD4zFA61XvSLa8fe1PzH91+4ii5vSeH-P+ER2wbQy2g@mail.gmail.com> (raw)
In-Reply-To: <20160224211947.GO28749@google.com>
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 ?
>
> That would make callers simpler and would make it easier for callers to
> know what to do. It also makes it possible to end with \n\n if the
> caller wants.
If the caller wants a \n\n it can do so as well using this patch?
If we add an \n unconditionally we run the risk of having lots of empty lines
in there. Consider the tests which are already there:
test-run-command run-command-parallel 3 sh -c "printf \"%s\n%s\n\"
Hello World" >actual
would produce
cat >expect <<-EOF
preloaded output of a child
Hello
World
preloaded output of a child
Hello
World
preloaded output of a child
Hello
World
preloaded output of a child
Hello
World
EOF
as both the child as well as we added a \n, so one empty line was born.
And as most child processes actually terminate with a reasonable \n
after their output,
I would not want to add another \n because it is simpler or easier to predict.
Thanks,
Stefan
>
> Thanks,
> Jonathan
next prev parent reply other threads:[~2016-02-24 21:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 3:20 [PATCHv15 0/5] Expose submodule parallelism to the user Stefan Beller
2016-02-24 3:20 ` [PATCHv15 1/5] run-command: expose default_{start_failure, task_finished} Stefan Beller
2016-02-24 3:20 ` [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy Stefan Beller
2016-02-24 20:07 ` Junio C Hamano
2016-02-24 21:19 ` Stefan Beller
2016-02-24 21:23 ` Junio C Hamano
2016-02-24 21:19 ` Jonathan Nieder
2016-02-24 21:59 ` Stefan Beller [this message]
2016-02-25 0:55 ` Jonathan Nieder
2016-02-25 2:56 ` Junio C Hamano
2016-02-24 3:20 ` [PATCHv15 3/5] git submodule update: have a dedicated helper for cloning Stefan Beller
2016-02-24 3:20 ` [PATCHv15 4/5] submodule update: expose parallelism to the user Stefan Beller
2016-02-24 3:20 ` [PATCHv15 5/5] clone: allow an explicit argument for parallel submodule clones Stefan Beller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGZ79kZvD4zFA61XvSLa8fe1PzH91+4ii5vSeH-P+ER2wbQy2g@mail.gmail.com \
--to=sbeller@google.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).