From: Junio C Hamano <gitster@pobox•com>
To: Johannes Sixt <j6t@kdbg•org>
Cc: Git Mailing List <git@vger•kernel.org>
Subject: Re: [PATCH] t9300: use cmp instead of test_cmp to compare binary files
Date: Fri, 12 Sep 2014 10:58:30 -0700 [thread overview]
Message-ID: <xmqq1trgbu0p.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <54132E88.8050803@kdbg.org> (Johannes Sixt's message of "Fri, 12 Sep 2014 19:34:00 +0200")
Johannes Sixt <j6t@kdbg•org> writes:
> test_cmp is intended to produce diff output for human consumption. The
> input in one instance in t9300-fast-import.sh are binary files, however.
> Use cmp to compare the files.
Thanks.
>
> This was noticed because on Windows we have a special implementation of
> test_cmp in pure bash code (to ignore differences due to intermittent CR
> in actual output), and bash runs into an infinite loop due to the binary
> nature of the input.
>
> Signed-off-by: Johannes Sixt <j6t@kdbg•org>
> ---
> t/t9300-fast-import.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
> index 99f5161..4b13170 100755
> --- a/t/t9300-fast-import.sh
> +++ b/t/t9300-fast-import.sh
> @@ -2687,7 +2687,7 @@ test_expect_success 'R: verify created pack' '
> test_expect_success \
> 'R: verify written objects' \
> 'git --git-dir=R/.git cat-file blob big-file:big1 >actual &&
> - test_cmp expect actual &&
> + cmp expect actual &&
> a=$(git --git-dir=R/.git rev-parse big-file:big1) &&
> b=$(git --git-dir=R/.git rev-parse big-file:big2) &&
> test $a = $b'
next prev parent reply other threads:[~2014-09-12 17:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 17:34 [PATCH] t9300: use cmp instead of test_cmp to compare binary files Johannes Sixt
2014-09-12 17:58 ` Junio C Hamano [this message]
2014-09-12 18:14 ` Thomas Braun
2014-09-12 19:47 ` [PATCH v2] t9300: use test_cmp_bin " Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq1trgbu0p.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=j6t@kdbg$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox