t7610-mergetool: use test_cmp instead of test $(cat file) = $txt
commite10dffd067002ea83c5293c9440adc5f23825110
authorJohannes Sixt <j6t@kdbg.org>
Wed, 12 Jun 2019 16:33:46 +0000 (12 18:33 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Jun 2019 20:20:56 +0000 (12 13:20 -0700)
tree6f93c1df01a1729fdd2800691fc3dd1a5ac35182
parentb4a04c8f7c4f98dd335dc5ee00059bcd6cfc8b53
t7610-mergetool: use test_cmp instead of test $(cat file) = $txt

Fix that anti-pattern by a sequence of echo and test_cmp.

The patch was generated with this command:

   sed -i -e '/test.*(cat/s/^\(\t*\)test "..cat \(.*\))" = \(".*"\)\(.*\)/\1echo \3 >expect \&\&\n\1test_cmp expect \2\4/' t7610-mergetool.sh

This helps on Windows, where test_cmp avoids spawning a process when
there is no difference.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7610-mergetool.sh