Re: [PATCH 05/19] t5516: drop unnecessary subshell and command invocation

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

 



On Thu, Dec 09, 2021 at 12:11:01AM -0500, Eric Sunshine wrote:

> To create its "expect" file, this test pipes into `sort` the output of
> `git for-each-ref` and a copy of that same output but with a minor
> textual transformation applied. To do so, it employs a subshell and
> commands `cat` and `sed` even though the same result can be accomplished
> by `sed` alone (without a subshell).

Clever. The ordering of output from sed is different than the original,
but because it all gets fed into sort anyway, that's OK.

In theory it could change the output of a stable sort of lines which
match (which won't be totally identical, because you are sorting with
-k3), but it seems we don't care in this instance.

-Peff



[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