Show 22 quoted lines
> On Fri, Oct 11, 2024 at 11:46 AM <chizobajames21@gmail.com> wrote:
>> In pipes, the exit code of a chain of commands is determined by
>> the final command. In order not to miss the exit code of a failed
>> Git command, avoid pipes instead write output of Git commands
>> into a file.
>> For better debugging experience, instances of "grep" were changed
>> to "test_grep". "test_grep" provides more context in case of a
>> failed "grep".
>>
>> Signed-off-by: Chizoba ODINAKA <chizobajames21@gmail.com>
>> ---
>> diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
>> @@ -344,7 +374,8 @@ test_expect_success 'test --format medium' '
>> - git replace -l --format medium | sort >actual &&
>> + git replace -l --format medium >actual &&
>> + sort actual &&
>> test_cmp expected actual
>
> Isn't this conversion broken? The `sort` command emits the sorted
> content to its standard output stream; it does not sort the file in
> place. So this is doing the sort but then simply throwing the output
> away, not capturing it to a file for comparison via `test_cmp`.