t5004: test ZIP archives with many entries
commit19ee29401dfc414924f335c21ef9880513f3c58d
authorRené Scharfe <l.s.r@web.de>
Sat, 22 Aug 2015 19:06:12 +0000 (22 21:06 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Aug 2015 15:52:10 +0000 (28 08:52 -0700)
treea96bcdacb92c6fb851cf8619afae338cff8d4143
parent8545932d45c91437ac439b1a2df12cf397f71311
t5004: test ZIP archives with many entries

A ZIP file directory has a 16-bit field for the number of entries it
contains.  There are 64-bit extensions to deal with that.  Demonstrate
that git archive --format=zip currently doesn't use them and instead
overflows the field.

InfoZIP's unzip doesn't care about this field and extracts all files
anyway.  Software that uses the directory for presenting a filesystem
like view quickly -- notably Windows -- depends on it, but doesn't
lend itself to an automatic test case easily.  Use InfoZIP's zipinfo,
which probably isn't available everywhere but at least can provides
*some* way to check this field.

To speed things up a bit create and commit only a subset of the files
and build a fake tree out of duplicates and pass that to git archive.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5004-archive-corner-cases.sh