From: Stefan Beller Date: Tue, 07 Mar 2017 20:52:49 GMT Subject: Re: [PATCH] t*: avoid using pipes Message-ID: In-Reply-To: <3026648b-a26c-bc67-62dc-170217d6c2ca@kdbg.org> On Tue, Mar 7, 2017 at 12:39 PM, Johannes Sixt 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 > ... >> >> 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! Stefan