t1050-large: generate large files without dd
commitd0a042a18652f35dff5419185dd84de2ea216e7c
authorJohannes Sixt <j6t@kdbg.org>
Wed, 14 Jan 2015 20:28:56 +0000 (14 21:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Jan 2015 21:08:12 +0000 (14 13:08 -0800)
tree758236ee0ea8ec2b60dea1557de3f68ea43c8dfb
parentfdf96a20acf96a6ac538df8113b2aafd6ed71d50
t1050-large: generate large files without dd

For some unknown reason, the dd on my Windows box segfaults randomly,
but since recently, it does so much more often than it used to, which
makes running the test suite burdensome.

Use printf to write large files instead of dd. To emphasize that three
of the large blobs are exact copies, use cp to allocate them.

The new code makes the files a bit smaller, and they are not sparse
anymore, but the tests do not depend on these properties. We do not want
to use test-genrandom here (which is used to generate large files
elsewhere in t1050), so that the files can be compressed well (which
keeps the run-time short).

The files are now large text files, not binary files. But since they
are larger than core.bigfilethreshold they are diagnosed as binary
by Git. For this reason, the 'git diff' tests that check the output
for "Binary files differ" still pass.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1050-large.sh