3 # Copyright (c) 2006 Shawn Pearce
6 test_description
='mmap sliding window tests'
8 TEST_PASSES_SANITIZE_LEAK
=true
17 test-tool genrandom "$i" 32768 >>$i &&
18 git update-index --add $i || return 1
20 echo d >d && cat c >>d && git update-index --add d &&
21 tree=$(git write-tree) &&
22 commit1=$(git commit-tree $tree </dev/null) &&
23 git update-ref HEAD $commit1 &&
25 test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
26 pack1=$(ls .git/objects/pack/*.pack) &&
30 'verify-pack -v, defaults' \
31 'git verify-pack -v "$pack1"'
34 'verify-pack -v, packedGitWindowSize == 1 page' \
35 'git config core.packedGitWindowSize 512 &&
36 git verify-pack -v "$pack1"'
39 'verify-pack -v, packedGit{WindowSize,Limit} == 1 page' \
40 'git config core.packedGitWindowSize 512 &&
41 git config core.packedGitLimit 512 &&
42 git verify-pack -v "$pack1"'
45 'repack -a -d, packedGit{WindowSize,Limit} == 1 page' \
46 'git config core.packedGitWindowSize 512 &&
47 git config core.packedGitLimit 512 &&
48 commit2=$(git commit-tree $tree -p $commit1 </dev/null) &&
49 git update-ref HEAD $commit2 &&
51 test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
52 pack2=$(ls .git/objects/pack/*.pack) &&
54 test "$pack1" \!= "$pack2"'
57 'verify-pack -v, defaults' \
58 'git config --unset core.packedGitWindowSize &&
59 git config --unset core.packedGitLimit &&
60 git verify-pack -v "$pack2"'