]> git.ipfire.org Git - thirdparty/git.git/commit
diff tests: don't ignore "git diff" exit code in "read" loop
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 7 Mar 2022 12:48:56 +0000 (13:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Mar 2022 21:27:40 +0000 (13:27 -0800)
commit5476bdf0e86272c47a93ae5c10486d2de31415bd
tree921a68c209fd76581531a0d365468053fd43da37
parentd239ef1cbacfa021175147ae69e6b5ec0de234a6
diff tests: don't ignore "git diff" exit code in "read" loop

Fix a test pattern that originated in f1af60bdba4 (Support 'diff=pgm'
attribute, 2007-04-22) so that we'll stop using "git diff" on the
left-hand-side of a pipe, and thus ignoring its exit code.

Rather than use intermediate files let's rewrite these tests to a much
simpler but more exhaustive "test_tmp" where we'll ignore certain
fields in the output.

Note that this is not a faithful conversion of the previous
"read/test" in some cases, as we were ignoring more fields there than
we strictly needed to. Now we'll "test_cmp" everything we can, and
only ignore the likes of paths to $TEMPDIR etc.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4020-diff-external.sh