@@ -8,55 +8,55 @@ test_description='mmap sliding window tests'
8
8
TEST_PASSES_SANITIZE_LEAK=true
9
9
. ./test-lib.sh
10
10
11
- test_expect_success \
12
- ' setup ' \
13
- ' rm -f .git/index* &&
14
- for i in a b c
15
- do
16
- echo $i >$i &&
17
- test-tool genrandom "$i" 32768 >>$i &&
18
- git update-index --add $i || return 1
19
- done &&
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 &&
24
- git repack -a -d &&
25
- test "$(git count- objects)" = "0 objects, 0 kilobytes" &&
26
- pack1=$(ls .git/objects/pack/*.pack) &&
27
- test -f "$pack1" '
28
-
29
- test_expect_success \
30
- ' verify-pack -v, defaults ' \
31
- ' git verify-pack -v "$pack1" '
32
-
33
- test_expect_success \
34
- ' verify-pack -v, packedGitWindowSize == 1 page ' \
35
- ' git config core.packedGitWindowSize 512 &&
36
- git verify-pack -v "$pack1" '
37
-
38
- test_expect_success \
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" '
43
-
44
- test_expect_success \
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 &&
50
- git repack -a -d &&
51
- test "$(git count- objects)" = "0 objects, 0 kilobytes" &&
52
- pack2=$(ls .git/objects/pack/*.pack) &&
53
- test -f "$pack2" &&
54
- test "$pack1" \!= "$pack2" '
55
-
56
- test_expect_success \
57
- ' verify-pack -v, defaults ' \
58
- ' git config --unset core.packedGitWindowSize &&
59
- git config --unset core.packedGitLimit &&
60
- git verify-pack -v "$pack2" '
11
+ test_expect_success ' setup ' '
12
+ rm -f .git/index* &&
13
+ for i in a b c
14
+ do
15
+ echo $i >$i &&
16
+ test-tool genrandom "$i" 32768 > >$i &&
17
+ git update-index --add $i || return 1
18
+ done &&
19
+ echo d >d && cat c >>d && git update-index --add d &&
20
+ tree=$( git write-tree) &&
21
+ commit1 =$(git commit -tree $tree </dev/null ) &&
22
+ git update-ref HEAD $commit1 &&
23
+ git repack -a -d &&
24
+ test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
25
+ pack1=$(ls .git/ objects/pack/*.pack) &&
26
+ test -f "$pack1"
27
+ '
28
+
29
+ test_expect_success ' verify-pack -v, defaults ' '
30
+ git verify-pack -v "$pack1"
31
+ '
32
+
33
+ test_expect_success ' verify-pack -v, packedGitWindowSize == 1 page ' '
34
+ git config core. packedGitWindowSize 512 &&
35
+ git verify-pack -v "$pack1"
36
+ '
37
+
38
+ test_expect_success ' verify-pack -v, packedGit{WindowSize,Limit} == 1 page ' '
39
+ git config core.packedGitWindowSize 512 &&
40
+ git config core.packedGitLimit 512 &&
41
+ git verify-pack -v "$pack1"
42
+ '
43
+
44
+ test_expect_success ' repack -a -d, packedGit{WindowSize,Limit} == 1 page ' '
45
+ git config core.packedGitWindowSize 512 &&
46
+ git config core.packedGitLimit 512 &&
47
+ commit2=$(git commit-tree $tree -p $commit1 </dev/null) &&
48
+ git update-ref HEAD $commit2 &&
49
+ git repack -a -d &&
50
+ test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
51
+ pack2=$(ls .git/ objects/pack/*.pack) &&
52
+ test -f "$pack2" &&
53
+ test "$pack1" \!= "$pack2"
54
+ '
55
+
56
+ test_expect_success ' verify-pack -v, defaults ' '
57
+ git config --unset core.packedGitWindowSize &&
58
+ git config --unset core.packedGitLimit &&
59
+ git verify-pack -v "$pack2"
60
+ '
61
61
62
62
test_done
0 commit comments