@@ -58,7 +58,7 @@ test_expect_success 'setup' '
58
58
git config core.commitGraph true
59
59
'
60
60
61
- run_three_modes () {
61
+ run_all_modes () {
62
62
test_when_finished rm -rf .git/objects/info/commit-graph &&
63
63
" $@ " < input > actual &&
64
64
test_cmp expect actual &&
@@ -70,8 +70,8 @@ run_three_modes () {
70
70
test_cmp expect actual
71
71
}
72
72
73
- test_three_modes () {
74
- run_three_modes test-tool reach " $@ "
73
+ test_all_modes () {
74
+ run_all_modes test-tool reach " $@ "
75
75
}
76
76
77
77
test_expect_success ' ref_newer:miss' '
@@ -80,7 +80,7 @@ test_expect_success 'ref_newer:miss' '
80
80
B:commit-4-9
81
81
EOF
82
82
echo "ref_newer(A,B):0" >expect &&
83
- test_three_modes ref_newer
83
+ test_all_modes ref_newer
84
84
'
85
85
86
86
test_expect_success ' ref_newer:hit' '
@@ -89,7 +89,7 @@ test_expect_success 'ref_newer:hit' '
89
89
B:commit-2-3
90
90
EOF
91
91
echo "ref_newer(A,B):1" >expect &&
92
- test_three_modes ref_newer
92
+ test_all_modes ref_newer
93
93
'
94
94
95
95
test_expect_success ' in_merge_bases:hit' '
@@ -98,7 +98,7 @@ test_expect_success 'in_merge_bases:hit' '
98
98
B:commit-8-8
99
99
EOF
100
100
echo "in_merge_bases(A,B):1" >expect &&
101
- test_three_modes in_merge_bases
101
+ test_all_modes in_merge_bases
102
102
'
103
103
104
104
test_expect_success ' in_merge_bases:miss' '
@@ -107,7 +107,7 @@ test_expect_success 'in_merge_bases:miss' '
107
107
B:commit-5-9
108
108
EOF
109
109
echo "in_merge_bases(A,B):0" >expect &&
110
- test_three_modes in_merge_bases
110
+ test_all_modes in_merge_bases
111
111
'
112
112
113
113
test_expect_success ' in_merge_bases_many:hit' '
@@ -117,7 +117,7 @@ test_expect_success 'in_merge_bases_many:hit' '
117
117
X:commit-5-7
118
118
EOF
119
119
echo "in_merge_bases_many(A,X):1" >expect &&
120
- test_three_modes in_merge_bases_many
120
+ test_all_modes in_merge_bases_many
121
121
'
122
122
123
123
test_expect_success ' in_merge_bases_many:miss' '
@@ -127,7 +127,7 @@ test_expect_success 'in_merge_bases_many:miss' '
127
127
X:commit-8-6
128
128
EOF
129
129
echo "in_merge_bases_many(A,X):0" >expect &&
130
- test_three_modes in_merge_bases_many
130
+ test_all_modes in_merge_bases_many
131
131
'
132
132
133
133
test_expect_success ' in_merge_bases_many:miss-heuristic' '
@@ -137,7 +137,7 @@ test_expect_success 'in_merge_bases_many:miss-heuristic' '
137
137
X:commit-6-6
138
138
EOF
139
139
echo "in_merge_bases_many(A,X):0" >expect &&
140
- test_three_modes in_merge_bases_many
140
+ test_all_modes in_merge_bases_many
141
141
'
142
142
143
143
test_expect_success ' is_descendant_of:hit' '
@@ -148,7 +148,7 @@ test_expect_success 'is_descendant_of:hit' '
148
148
X:commit-1-1
149
149
EOF
150
150
echo "is_descendant_of(A,X):1" >expect &&
151
- test_three_modes is_descendant_of
151
+ test_all_modes is_descendant_of
152
152
'
153
153
154
154
test_expect_success ' is_descendant_of:miss' '
@@ -159,7 +159,7 @@ test_expect_success 'is_descendant_of:miss' '
159
159
X:commit-7-6
160
160
EOF
161
161
echo "is_descendant_of(A,X):0" >expect &&
162
- test_three_modes is_descendant_of
162
+ test_all_modes is_descendant_of
163
163
'
164
164
165
165
test_expect_success ' get_merge_bases_many' '
@@ -174,7 +174,7 @@ test_expect_success 'get_merge_bases_many' '
174
174
git rev-parse commit-5-6 \
175
175
commit-4-7 | sort
176
176
} >expect &&
177
- test_three_modes get_merge_bases_many
177
+ test_all_modes get_merge_bases_many
178
178
'
179
179
180
180
test_expect_success ' reduce_heads' '
@@ -196,7 +196,7 @@ test_expect_success 'reduce_heads' '
196
196
commit-2-8 \
197
197
commit-1-10 | sort
198
198
} >expect &&
199
- test_three_modes reduce_heads
199
+ test_all_modes reduce_heads
200
200
'
201
201
202
202
test_expect_success ' can_all_from_reach:hit' '
@@ -219,7 +219,7 @@ test_expect_success 'can_all_from_reach:hit' '
219
219
Y:commit-8-1
220
220
EOF
221
221
echo "can_all_from_reach(X,Y):1" >expect &&
222
- test_three_modes can_all_from_reach
222
+ test_all_modes can_all_from_reach
223
223
'
224
224
225
225
test_expect_success ' can_all_from_reach:miss' '
@@ -241,7 +241,7 @@ test_expect_success 'can_all_from_reach:miss' '
241
241
Y:commit-8-5
242
242
EOF
243
243
echo "can_all_from_reach(X,Y):0" >expect &&
244
- test_three_modes can_all_from_reach
244
+ test_all_modes can_all_from_reach
245
245
'
246
246
247
247
test_expect_success ' can_all_from_reach_with_flag: tags case' '
@@ -264,7 +264,7 @@ test_expect_success 'can_all_from_reach_with_flag: tags case' '
264
264
Y:commit-8-1
265
265
EOF
266
266
echo "can_all_from_reach_with_flag(X,_,_,0,0):1" >expect &&
267
- test_three_modes can_all_from_reach_with_flag
267
+ test_all_modes can_all_from_reach_with_flag
268
268
'
269
269
270
270
test_expect_success ' commit_contains:hit' '
@@ -280,8 +280,8 @@ test_expect_success 'commit_contains:hit' '
280
280
X:commit-9-3
281
281
EOF
282
282
echo "commit_contains(_,A,X,_):1" >expect &&
283
- test_three_modes commit_contains &&
284
- test_three_modes commit_contains --tag
283
+ test_all_modes commit_contains &&
284
+ test_all_modes commit_contains --tag
285
285
'
286
286
287
287
test_expect_success ' commit_contains:miss' '
@@ -297,8 +297,8 @@ test_expect_success 'commit_contains:miss' '
297
297
X:commit-9-3
298
298
EOF
299
299
echo "commit_contains(_,A,X,_):0" >expect &&
300
- test_three_modes commit_contains &&
301
- test_three_modes commit_contains --tag
300
+ test_all_modes commit_contains &&
301
+ test_all_modes commit_contains --tag
302
302
'
303
303
304
304
test_expect_success ' rev-list: basic topo-order' '
@@ -310,7 +310,7 @@ test_expect_success 'rev-list: basic topo-order' '
310
310
commit-6-2 commit-5-2 commit-4-2 commit-3-2 commit-2-2 commit-1-2 \
311
311
commit-6-1 commit-5-1 commit-4-1 commit-3-1 commit-2-1 commit-1-1 \
312
312
>expect &&
313
- run_three_modes git rev-list --topo-order commit-6-6
313
+ run_all_modes git rev-list --topo-order commit-6-6
314
314
'
315
315
316
316
test_expect_success ' rev-list: first-parent topo-order' '
@@ -322,7 +322,7 @@ test_expect_success 'rev-list: first-parent topo-order' '
322
322
commit-6-2 \
323
323
commit-6-1 commit-5-1 commit-4-1 commit-3-1 commit-2-1 commit-1-1 \
324
324
>expect &&
325
- run_three_modes git rev-list --first-parent --topo-order commit-6-6
325
+ run_all_modes git rev-list --first-parent --topo-order commit-6-6
326
326
'
327
327
328
328
test_expect_success ' rev-list: range topo-order' '
@@ -334,7 +334,7 @@ test_expect_success 'rev-list: range topo-order' '
334
334
commit-6-2 commit-5-2 commit-4-2 \
335
335
commit-6-1 commit-5-1 commit-4-1 \
336
336
>expect &&
337
- run_three_modes git rev-list --topo-order commit-3-3..commit-6-6
337
+ run_all_modes git rev-list --topo-order commit-3-3..commit-6-6
338
338
'
339
339
340
340
test_expect_success ' rev-list: range topo-order' '
@@ -346,7 +346,7 @@ test_expect_success 'rev-list: range topo-order' '
346
346
commit-6-2 commit-5-2 commit-4-2 \
347
347
commit-6-1 commit-5-1 commit-4-1 \
348
348
>expect &&
349
- run_three_modes git rev-list --topo-order commit-3-8..commit-6-6
349
+ run_all_modes git rev-list --topo-order commit-3-8..commit-6-6
350
350
'
351
351
352
352
test_expect_success ' rev-list: first-parent range topo-order' '
@@ -358,7 +358,7 @@ test_expect_success 'rev-list: first-parent range topo-order' '
358
358
commit-6-2 \
359
359
commit-6-1 commit-5-1 commit-4-1 \
360
360
>expect &&
361
- run_three_modes git rev-list --first-parent --topo-order commit-3-8..commit-6-6
361
+ run_all_modes git rev-list --first-parent --topo-order commit-3-8..commit-6-6
362
362
'
363
363
364
364
test_expect_success ' rev-list: ancestry-path topo-order' '
@@ -368,7 +368,7 @@ test_expect_success 'rev-list: ancestry-path topo-order' '
368
368
commit-6-4 commit-5-4 commit-4-4 commit-3-4 \
369
369
commit-6-3 commit-5-3 commit-4-3 \
370
370
>expect &&
371
- run_three_modes git rev-list --topo-order --ancestry-path commit-3-3..commit-6-6
371
+ run_all_modes git rev-list --topo-order --ancestry-path commit-3-3..commit-6-6
372
372
'
373
373
374
374
test_expect_success ' rev-list: symmetric difference topo-order' '
@@ -382,7 +382,7 @@ test_expect_success 'rev-list: symmetric difference topo-order' '
382
382
commit-3-8 commit-2-8 commit-1-8 \
383
383
commit-3-7 commit-2-7 commit-1-7 \
384
384
>expect &&
385
- run_three_modes git rev-list --topo-order commit-3-8...commit-6-6
385
+ run_all_modes git rev-list --topo-order commit-3-8...commit-6-6
386
386
'
387
387
388
388
test_expect_success ' get_reachable_subset:all' '
@@ -402,7 +402,7 @@ test_expect_success 'get_reachable_subset:all' '
402
402
commit-1-7 \
403
403
commit-5-6 | sort
404
404
) >expect &&
405
- test_three_modes get_reachable_subset
405
+ test_all_modes get_reachable_subset
406
406
'
407
407
408
408
test_expect_success ' get_reachable_subset:some' '
@@ -420,7 +420,7 @@ test_expect_success 'get_reachable_subset:some' '
420
420
git rev-parse commit-3-3 \
421
421
commit-1-7 | sort
422
422
) >expect &&
423
- test_three_modes get_reachable_subset
423
+ test_all_modes get_reachable_subset
424
424
'
425
425
426
426
test_expect_success ' get_reachable_subset:none' '
@@ -434,7 +434,7 @@ test_expect_success 'get_reachable_subset:none' '
434
434
Y:commit-2-8
435
435
EOF
436
436
echo "get_reachable_subset(X,Y)" >expect &&
437
- test_three_modes get_reachable_subset
437
+ test_all_modes get_reachable_subset
438
438
'
439
439
440
440
test_done
0 commit comments