From: Shubham Mishra Date: Thu, 24 Feb 2022 05:14:09 GMT Subject: Re: [PATCH v2 1/2] t0001: avoid pipes with Git on LHS Message-ID: In-Reply-To: HI Junio, I acknowledge, this patch is here by mistake, we don't need to merge it. Thanks, Shubham On Thu, Feb 24, 2022 at 2:40 AM Junio C Hamano wrote: > > Shubham Mishra 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 > > ) > > '