Web lists-archives.com

Re: [PATCH] t*: avoid using pipes

On Tue, Mar 7, 2017 at 12:39 PM, Johannes Sixt <j6t@xxxxxxxx> wrote:

> Welcome to the Git community!

> Actually, being a *micro* project, it should stay so. Not doing all of the
> changes would leave some tasks for other apprentices to get warm with our
> review process.

right, so just pick one file.

> Thank you, Stefan, for digging out one particularly interesting case.
>> When looking at the content, the conversion seems a bit mechanical
>> (which is fine for a micro project), such as:
>> ...
>> - test "$(git show --pretty=format:%s | head -n 1)" = "one"
>> + test "$(git show --pretty=format:%s >out && head -n 1 <out)" = "one"
>> ...
>> specifically for the "head" command I don't think it makes a
>> difference in correctness whether you pipe the file into the tool
>> or give the filename, i.e.  "head -n 1 out" would work just as fine.
> True, but!
> The intent of removing git invocations from the upstream of a pipe is that a
> failure exit code is able to stop a && chain.

Doh! I was so fixated over discussing whether to use "<" or not,
to miss looking for the actual goal.

Thanks for spotting!