Re: [PATCH 14/22] t/t9*: avoid redundant uses of cat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 05, 2024 at 04:43:33PM -0800, Junio C Hamano wrote:
> Rubén Justo <rjusto@xxxxxxxxx> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux