On Fri, Nov 18, 2022 at 03:19:55PM -0800, Junio C Hamano wrote: > 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