Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files
- From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
- Date
- Jun 4, 2014, 12:13 UTC
- Message-ID
- <538F0D78.3020708@virtuell-zuhause.de>
- In-Reply-To
- <20140604114252.GA22250@camelia.ucw.cz>
Am 04.06.2014 13:42, schrieb Stepan Kasal:
Show 32 quoted lines
> 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> > --- > t/t5000-tar-tree.sh | 34 +++++++++++++++++----------------- > t/t5001-archive-attr.sh | 2 +- > t/t5003-archive-zip.sh | 6 +++--- > t/t5004-archive-corner-cases.sh | 2 +- > 4 files changed, 22 insertions(+), 22 deletions(-) > > diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh > index 1cf0a4e..31b1fd1 100755 > --- a/t/t5000-tar-tree.sh > +++ b/t/t5000-tar-tree.sh > @@ -164,7 +164,7 @@ check_tar with_olde-prefix olde- > test_expect_success 'git archive on large files' ' > test_config core.bigfilethreshold 1 && > git archive HEAD >b3.tar && > - test_cmp b.tar b3.tar > + cmp b.tar b3.tar > '
Wouldn't a function like test_cmp_bin() be better suited for all? The windows folks can then use cmp inside test_cmp_bin() and all others just use test_cmp.
-- -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "msysGit" group. To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.