Re: [PATCH v3 2/2] tests(mingw): avoid very slow `mingw_test_cmp`
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Nov 19, 2022, 02:56 UTC
- Message-ID
- <Y3hF1vOQ8waqpvXo@nand.local>
- In-Reply-To
- <xmqqr0xzkfz8.fsf@gitster.g>
On Fri, Nov 18, 2022 at 03:19:55PM -0800, Junio C Hamano wrote:
Show 7 quoted lines
> Well "! test_cmp" is wrong anyway, because it _expects_ two files > are the same and gives more detailed diagnosis when they differ by > giving "diff" output. > > If you expect them to be different, "! test_cmp" would give > "detailed diagnosis" in the wrong case, i.e. the outcome is what we > expect.
I agree that "! test_cmp foo bar" will give output about how "foo" is different from "bar" (and halt the test only when the two have the same contents).
> So the caller must do "test_cmp !" whether the underlying > implementation of test_cmp uses "diff -u" or "diff --no-index".
But this confuses me. "git grep 'test_cmp !'" turns up no results, and furthermore, test_cmp() itself begins with:
test "$#" -ne 2 && BUG "2 param"
So I am not sure what you are referring to.
Thanks, Taylor