diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2012-05-03 08:51:08 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-03 10:22:57 -0700 |
commit | c743c21591f9433fe784ac38902872701ce2e850 (patch) | |
tree | 1ed1fd767799e5bcbb32c443fe9ef916bfe1026f /t | |
parent | archive-zip: streaming for stored files (diff) | |
download | tgif-c743c21591f9433fe784ac38902872701ce2e850.tar.xz |
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 <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t1050-large.sh | 4 | ||||
-rwxr-xr-x | t/t5000-tar-tree.sh | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh index 9db54b56bc..55ed955cef 100755 --- a/t/t1050-large.sh +++ b/t/t1050-large.sh @@ -142,4 +142,8 @@ test_expect_success 'zip achiving, store only' ' git archive --format=zip -0 HEAD >/dev/null ' +test_expect_success 'zip achiving, deflate' ' + git archive --format=zip HEAD >/dev/null +' + test_done diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 3b54c38621..94f2ebac5f 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -250,6 +250,13 @@ test_expect_success UNZIP 'git archive -0 --format=zip on large files' ' (mkdir large && cd large && $UNZIP ../large.zip) ' +test_expect_success UNZIP 'git archive --format=zip on large files' ' + test_config core.bigfilethreshold 1 && + git archive --format=zip HEAD >large-compressed.zip && + (mkdir large-compressed && cd large-compressed && $UNZIP ../large-compressed.zip) && + 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' |