Re: [PATCH 14/22] t/t9*: avoid redundant uses of cat
On Tue, Mar 05, 2024 at 04:43:33PM -0800, Junio C Hamano wrote:
Show 12 quoted lines
> Rubén Justo <rjusto@gmail.com> writes:
>
> >> git ls-tree L2 g/b/ >tmp &&
> >> - cat tmp | cut -f 2 >actual &&
> >> + cut -f 2 <tmp >actual &&
> >> test_cmp expect actual &&
> >
> > Nit: Maybe we can avoid tmp.
>
> Piping "git ls-tree" output to "cut" would hide the exit status of
> "git ls-tree" if it fails, which is not a good idea, so I do not
> think of a way to avoid tmp so easily.
Right. Thanks for pointing that out.