@@ -42,63 +42,70 @@ test_expect_success 'rev-list --test-bitmap verifies bitmaps' '
42
42
git rev-list --test-bitmap HEAD
43
43
'
44
44
45
- rev_list_tests () {
46
- state=$1
47
-
48
- test_expect_success " counting commits via bitmap ($state )" '
49
- git rev-list --count HEAD >expect &&
50
- git rev-list --use-bitmap-index --count HEAD >actual &&
45
+ rev_list_tests_head () {
46
+ test_expect_success " counting commits via bitmap ($state , $branch )" '
47
+ git rev-list --count $branch >expect &&
48
+ git rev-list --use-bitmap-index --count $branch >actual &&
51
49
test_cmp expect actual
52
50
'
53
51
54
- test_expect_success " counting partial commits via bitmap ($state )" '
55
- git rev-list --count HEAD ~5..HEAD >expect &&
56
- git rev-list --use-bitmap-index --count HEAD ~5..HEAD >actual &&
52
+ test_expect_success " counting partial commits via bitmap ($state , $branch )" '
53
+ git rev-list --count $branch ~5..$branch >expect &&
54
+ git rev-list --use-bitmap-index --count $branch ~5..$branch >actual &&
57
55
test_cmp expect actual
58
56
'
59
57
60
- test_expect_success " counting commits with limit ($state )" '
61
- git rev-list --count -n 1 HEAD >expect &&
62
- git rev-list --use-bitmap-index --count -n 1 HEAD >actual &&
58
+ test_expect_success " counting commits with limit ($state , $branch )" '
59
+ git rev-list --count -n 1 $branch >expect &&
60
+ git rev-list --use-bitmap-index --count -n 1 $branch >actual &&
63
61
test_cmp expect actual
64
62
'
65
63
66
- test_expect_success " counting non-linear history ($state )" '
64
+ test_expect_success " counting non-linear history ($state , $branch )" '
67
65
git rev-list --count other...second >expect &&
68
66
git rev-list --use-bitmap-index --count other...second >actual &&
69
67
test_cmp expect actual
70
68
'
71
69
72
- test_expect_success " counting commits with limiting ($state )" '
73
- git rev-list --count HEAD -- 1.t >expect &&
74
- git rev-list --use-bitmap-index --count HEAD -- 1.t >actual &&
70
+ test_expect_success " counting commits with limiting ($state , $branch )" '
71
+ git rev-list --count $branch -- 1.t >expect &&
72
+ git rev-list --use-bitmap-index --count $branch -- 1.t >actual &&
75
73
test_cmp expect actual
76
74
'
77
75
78
- test_expect_success " counting objects via bitmap ($state )" '
79
- git rev-list --count --objects HEAD >expect &&
80
- git rev-list --use-bitmap-index --count --objects HEAD >actual &&
76
+ test_expect_success " counting objects via bitmap ($state , $branch )" '
77
+ git rev-list --count --objects $branch >expect &&
78
+ git rev-list --use-bitmap-index --count --objects $branch >actual &&
81
79
test_cmp expect actual
82
80
'
83
81
84
- test_expect_success " enumerate commits ($state )" '
85
- git rev-list --use-bitmap-index HEAD >actual &&
86
- git rev-list HEAD >expect &&
82
+ test_expect_success " enumerate commits ($state , $branch )" '
83
+ git rev-list --use-bitmap-index $branch >actual &&
84
+ git rev-list $branch >expect &&
87
85
test_bitmap_traversal --no-confirm-bitmaps expect actual
88
86
'
89
87
90
- test_expect_success " enumerate --objects ($state )" '
91
- git rev-list --objects --use-bitmap-index HEAD >actual &&
92
- git rev-list --objects HEAD >expect &&
88
+ test_expect_success " enumerate --objects ($state , $branch )" '
89
+ git rev-list --objects --use-bitmap-index $branch >actual &&
90
+ git rev-list --objects $branch >expect &&
93
91
test_bitmap_traversal expect actual
94
92
'
95
93
96
- test_expect_success " bitmap --objects handles non-commit objects ($state )" '
97
- git rev-list --objects --use-bitmap-index HEAD tagged-blob >actual &&
94
+ test_expect_success " bitmap --objects handles non-commit objects ($state , $branch )" '
95
+ git rev-list --objects --use-bitmap-index $branch tagged-blob >actual &&
98
96
grep $blob actual
99
97
'
100
98
}
101
99
100
+ rev_list_tests () {
101
+ state=$1
102
+
103
+ for branch in " second" " other"
104
+ do
105
+ rev_list_tests_head
106
+ done
107
+ }
108
+
102
109
rev_list_tests ' full bitmap'
103
110
104
111
test_expect_success ' clone from bitmapped repository' '
0 commit comments