path: root/t/
diff options
authorRené Scharfe <>2012-05-03 01:51:08 (GMT)
committerJunio C Hamano <>2012-05-03 17:22:57 (GMT)
commitc743c21591f9433fe784ac38902872701ce2e850 (patch)
tree1ed1fd767799e5bcbb32c443fe9ef916bfe1026f /t/
parent2158f883d99a92f801534c91294305ccbe171f79 (diff)
archive-zip: streaming for deflated files
After an entry has been streamed out, its CRC and sizes are written as part of a data descriptor. For simplicity, we make the buffer for the compressed chunks twice as big as for the uncompressed ones, to be sure the result fit in even if deflate makes them bigger. t5000 verifies output. t1050 makes sure the command always respects core.bigfilethreshold Signed-off-by: Rene Scharfe <> Signed-off-by: Nguyễn Thái Ngọc Duy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 7 insertions, 0 deletions
diff --git a/t/ b/t/
index 3b54c38..94f2eba 100755
--- a/t/
+++ b/t/
@@ -250,6 +250,13 @@ test_expect_success UNZIP 'git archive -0 --format=zip on large files' '
(mkdir large && cd large && $UNZIP ../
+test_expect_success UNZIP 'git archive --format=zip on large files' '
+ test_config core.bigfilethreshold 1 &&
+ git archive --format=zip HEAD > &&
+ (mkdir large-compressed && cd large-compressed && $UNZIP ../ &&
+ test_cmp large-compressed/a/bin/sh large/a/bin/sh
test_expect_success \
'git archive --list outside of a git repo' \
'GIT_DIR=some/non-existing/directory git archive --list'