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