diff options
Diffstat (limited to 't/t5003-archive-zip.sh')
| -rwxr-xr-x | t/t5003-archive-zip.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh index 961c6aac25..c8c1c5c06b 100755 --- a/t/t5003-archive-zip.sh +++ b/t/t5003-archive-zip.sh @@ -239,6 +239,40 @@ check_zip with_untracked2 check_added with_untracked2 untracked one/untracked check_added with_untracked2 untracked two/untracked +test_expect_success 'git-archive --format=zip with bigFile delta chains' ' + test_when_finished rm -rf repo && + git init repo && + ( + cd repo && + test-tool genrandom foo 100000 >base && + { + cat base && + echo "trailing data" + } >delta-1 && + { + cat delta-1 && + echo "trailing data" + } >delta-2 && + git add . && + git commit -m "blobs" && + git repack -Ad && + git verify-pack -v .git/objects/pack/pack-*.idx >stats && + test_grep "chain length = 1: 1 object" stats && + test_grep "chain length = 2: 1 object" stats && + + git -c core.bigFileThreshold=1k archive --format=zip HEAD >archive.zip && + if test_have_prereq UNZIP + then + mkdir unpack && + cd unpack && + "$GIT_UNZIP" ../archive.zip && + test_cmp base ../base && + test_cmp delta-1 ../delta-1 && + test_cmp delta-2 ../delta-2 + fi + ) +' + # Test remote archive over HTTP protocol. # # Note: this should be the last part of this test suite, because |
