public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Eric Wong <e@80x24•org>
Cc: Jeff King <peff@peff•net>, Ren?? Scharfe <l.s.r@web•de>,
	git@vger•kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx•de>
Subject: Re: [PATCH] test-lib: stricter unzip(1) check
Date: Mon, 18 Jul 2016 13:19:24 -0700	[thread overview]
Message-ID: <xmqqk2giitrn.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160718200351.GA61232@plume> (Eric Wong's message of "Mon, 18 Jul 2016 20:03:51 +0000")

Eric Wong <e@80x24•org> writes:

> Junio C Hamano <gitster@pobox•com> wrote:
>> +test_lazy_prereq UNZIP_AUTOTEXT '
>> +	(
>> +		mkdir unzip-autotext &&
>> +		cd unzip-autotext
>> +		"$GIT_UNZIP" -a "$TEST_DIRECTORY"/t5003/infozip-text.zip &&
>> +		test -f text
>> +	)
>
> /usr/bin/unzip actually takes -a on FreeBSD, just not in the
> same way the Info-ZIP version does, so I suspect "test -f"
> here is not enough.

Hmph.  So it only and always does "CRLF -> LF", while Info-ZIP
version does something like autocrlf?

> I would test this, but I can't apply it:
>
>> diff --git a/t/t5003/infozip-text.zip b/t/t5003/infozip-text.zip
>> new file mode 100644
>> index 0000000..a019acb
>> Binary files /dev/null and b/t/t5003/infozip-text.zip differ

Heh.  It was created like so:

	$ printf 'text\r\n' >text && zip -ll infozip-text.zip text
	$ zipinfo infozip-text.zip text
        -rw-r-----  3.0 unx        5 tx stor 16-Jul-18 13:12 text

 t/t5003/infozip-text.zip | Bin 0 -> 163 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/t/t5003/infozip-text.zip b/t/t5003/infozip-text.zip
new file mode 100644
index 0000000000000000000000000000000000000000..7119bbb62699f4cb613f3675f57aa9c9dc021ea0
GIT binary patch
literal 163
zcmWIWW@h1H0D&2qpFGrWy)kD6vO$=IL586uwW1_6gp+~U-l8`ggi9;985mjSu4iOm
z=@4cB%X0;IGcw6B<1$17WHtjM5HDy1u^>jWLX1Q+F2I|W4Wxz<2)%%`Gl;_g0G&b|
AeE<Le

literal 0
HcmV?d00001


  reply	other threads:[~2016-07-18 20:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18  6:44 [PATCH] test-lib: stricter unzip(1) check Eric Wong
2016-07-18 13:04 ` Jeff King
2016-07-18 13:52   ` Johannes Schindelin
2016-07-18 18:20     ` Junio C Hamano
2016-07-18 18:56       ` Jeff King
2016-07-18 19:17         ` Junio C Hamano
2016-07-19 11:27       ` Johannes Schindelin
2016-07-19 17:26         ` Junio C Hamano
2016-07-18 19:43   ` Junio C Hamano
2016-07-18 20:03     ` Eric Wong
2016-07-18 20:19       ` Junio C Hamano [this message]
2016-07-18 21:19         ` Eric Wong
2016-07-18 21:27           ` Junio C Hamano
2016-07-18 23:41     ` Jeff King

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=xmqqk2giitrn.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=e@80x24$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=l.s.r@web$(echo .)de \
    --cc=peff@peff$(echo .)net \
    /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