summaryrefslogtreecommitdiff
path: root/t/t5004
diff options
context:
space:
mode:
authorLibravatar René Scharfe <rene.scharfe@lsrfire.ath.cx>2013-05-09 15:36:10 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-05-09 12:22:31 -0700
commit56ee96572a7ec5a6b1a59ccdbbf204af16903d17 (patch)
treeb023d497dfbeebc83ca66df7ecbb2d6492e34801 /t/t5004
parentt5004: avoid using tar for checking emptiness of archive (diff)
downloadtgif-56ee96572a7ec5a6b1a59ccdbbf204af16903d17.tar.xz
t5004: resurrect original empty tar archive test
Add a test to verify the emptiness of an archive by extracting its contents. Don't run this test if the version of tar doesn't support archives containing only a comment header, though. The existing check 'tar archive of empty tree is empty' used to work like that (minus the tar capability check) but was changed to depend on the exact representation of empty tar files created by git archive instead of on the behaviour of tar in order to avoid issues with different tar versions. The different approaches test different things: The existing one is for empty trees, for which we know the exact expected output and thus we can simply check it without extracting; the new one is for commits with empty trees, whose archives include stamps and so the more "natural" check by extraction is a better fit because it focuses on the interesting aspect, namely the absence of any archive entries. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5004')
-rw-r--r--t/t5004/empty-with-pax-header.tarbin0 -> 10240 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/t/t5004/empty-with-pax-header.tar b/t/t5004/empty-with-pax-header.tar
new file mode 100644
index 0000000000..da9e39e6cf
--- /dev/null
+++ b/t/t5004/empty-with-pax-header.tar
Binary files differ