]> git.ipfire.org Git - thirdparty/git.git/commit - t/test-lib-functions.sh
t5000, t5003: do not use test_cmp to compare binary files
authorStepan Kasal <kasal@ucw.cz>
Wed, 4 Jun 2014 15:57:52 +0000 (17:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Jun 2014 18:14:25 +0000 (11:14 -0700)
commitb93e6e36637bed9d80f9ffa786ea78044fde6bac
tree09d99c7e31d8f19cbba35c2682060f5f22f2b0b2
parente156455ea49124c140a67623f22a393db62d5d98
t5000, t5003: do not use test_cmp to compare binary files

test_cmp() is primarily meant to compare text files (and display the
difference for debug purposes).

Raw "cmp" is better suited to compare binary files (tar, zip, etc.).

On MinGW, test_cmp is a shell function mingw_test_cmp that tries to
read both files into environment, stripping CR characters (introduced
in commit 4d715ac0).

This function usually speeds things up, as fork is extremly slow on
Windows.  But no wonder that this function is extremely slow and
sometimes even crashes when comparing large tar or zip files.

Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5000-tar-tree.sh
t/t5001-archive-attr.sh
t/t5003-archive-zip.sh
t/t5004-archive-corner-cases.sh
t/test-lib-functions.sh