Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > IOW this bit in t/README: > > - Don't use '! git cmd' when you want to make sure the git command > exits with failure in a controlled way by calling "die()".[...] > > So, before this series a test like this on Windows, with > GIT_TEST_CMP=mingw_test_cmp: > > ! test_cmp foo bar > > Would only succeed if "foo" and "bar" weren't identical, now it'll also > succeed if 'git diff --no-index' happens to segfault on those inputs. 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. So the caller must do "test_cmp !" whether the underlying implementation of test_cmp uses "diff -u" or "diff --no-index".