Subject: Re: [PATCH 09/22] t/t4*: avoid redundant uses of cat

From: Beat Bolli <[email-masked]>
Date: Wed, 6 Mar 2024 21:58:41 +0100

On 06.03.24 02:08, Eric Sunshine wrote:
> On Tue, Mar 5, 2024 at 4:31 PM Beat Bolli <[email-masked]> wrote:
>> diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh
>> @@ -232,7 +232,7 @@ keep_only_cr () {
>>   test_expect_success 'external diff with autocrlf = true' '
>>          test_config core.autocrlf true &&
>>          GIT_EXTERNAL_DIFF=./fake-diff.sh git diff &&
>> -       test $(wc -l < crlfed.txt) = $(cat crlfed.txt | keep_only_cr | wc -c)
>> +       test $(wc -l < crlfed.txt) = $(keep_only_cr <crlfed.txt | wc -c)
>>   '
> 
> Could also fix the style problem (drop whitespace after existing `<`
> operator) while here, but not at all worth a reroll.
> 
>> diff --git a/t/t4150-am.sh b/t/t4150-am.sh
>> @@ -786,7 +786,7 @@ test_expect_success 'am takes patches from a Pine mailbox' '
>>          git checkout first &&
>> -       cat pine patch1 | git am &&
>> +       git am pine patch1 &&
> 
> As with Junio, the semantic change made here concerned me.

I was even more on the fence about this hunk than the others, but then 
the test was about 'am takes patches from a Pine mailbox', not 
specifically about reading a Pine mailbox from stdin. But I can drop 
this hunk in v2.

Cheers, Beat