Shubham Mishra <shivam828787@xxxxxxxxx> writes: > Pipes ignore error codes of LHS command and thu`s we should not use > them with Git in tests. As an alternative, use a 'tmp' file to write > the Git output so we can test the exit code. I do not know what thu`s is, but the above describes a sensible criterion to decide which pipe to touch and which pipe to leave alone. > - find .git/worktrees -print | sort >expected && > + find .git/worktrees -print >tmp && > + sort tmp >expected && And this change or ... > git -C ../linked-worktree init && > test_cmp expected-exclude .git/info/exclude && > test_cmp expected-config .git/config && > - find .git/worktrees -print | sort >actual && > + find .git/worktrees -print >tmp && > + sort tmp >actual && ... this change squarely contradict the reasoning written in the proposed log message. These pipelines place "find" on the upstream of their pipe, and "find" is not something we are worried about introducing new bug into. > test_cmp expected actual > ) > '