From b93e6e36637bed9d80f9ffa786ea78044fde6bac Mon Sep 17 00:00:00 2001 From: Stepan Kasal Date: Wed, 4 Jun 2014 17:57:52 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- t/test-lib-functions.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 't/test-lib-functions.sh') diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 158e10a67e..cf7b41f66d 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -617,6 +617,12 @@ test_cmp() { $GIT_TEST_CMP "$@" } +# test_cmp_bin - helper to compare binary files + +test_cmp_bin() { + cmp "$@" +} + # Check if the file expected to be empty is indeed empty, and barfs # otherwise. -- cgit v1.3-5-g9baa