17
git-update-index --add path0
18
save_tag tree git-write-tree
17
git update-index --add path0
18
save_tag tree git write-tree
19
19
on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree
20
20
on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root
21
21
on_committer_date "1971-08-16 00:00:02" save_tag l1 unique_commit l1 tree -p l0
77
77
save_tag g3 unique_commit g5 tree -p g2
78
78
save_tag g4 unique_commit g6 tree -p g3 -p h2
80
git-update-ref HEAD $(tag l5)
80
git update-ref HEAD $(tag l5)
82
test_output_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -d \" \"' <<EOF
82
test_output_expect_success 'rev-list has correct number of entries' 'git rev-list HEAD | wc -l | tr -d \" \"' <<EOF
86
test_output_expect_success 'simple topo order' 'git-rev-list --topo-order HEAD' <<EOF
86
test_output_expect_success 'simple topo order' 'git rev-list --topo-order HEAD' <<EOF
118
test_output_expect_success 'multiple heads' 'git-rev-list --topo-order a3 b3 c3' <<EOF
135
test_output_expect_success 'multiple heads, prune at a1' 'git-rev-list --topo-order a3 b3 c3 ^a1' <<EOF
146
test_output_expect_success 'multiple heads, prune at l1' 'git-rev-list --topo-order a3 b3 c3 ^l1' <<EOF
160
test_output_expect_success 'cross-epoch, head at l5, prune at l1' 'git-rev-list --topo-order l5 ^l1' <<EOF
179
test_output_expect_success 'duplicated head arguments' 'git-rev-list --topo-order l5 l5 ^l1' <<EOF
198
test_output_expect_success 'prune near topo' 'git-rev-list --topo-order a4 ^c3' <<EOF
207
test_output_expect_success "head has no parent" 'git-rev-list --topo-order root' <<EOF
211
test_output_expect_success "two nodes - one head, one base" 'git-rev-list --topo-order l0' <<EOF
216
test_output_expect_success "three nodes one head, one internal, one base" 'git-rev-list --topo-order l1' <<EOF
222
test_output_expect_success "linear prune l2 ^root" 'git-rev-list --topo-order l2 ^root' <<EOF
228
test_output_expect_success "linear prune l2 ^l0" 'git-rev-list --topo-order l2 ^l0' <<EOF
233
test_output_expect_success "linear prune l2 ^l1" 'git-rev-list --topo-order l2 ^l1' <<EOF
237
test_output_expect_success "linear prune l5 ^a4" 'git-rev-list --topo-order l5 ^a4' <<EOF
243
test_output_expect_success "linear prune l5 ^l3" 'git-rev-list --topo-order l5 ^l3' <<EOF
248
test_output_expect_success "linear prune l5 ^l4" 'git-rev-list --topo-order l5 ^l4' <<EOF
252
test_output_expect_success "max-count 10 - topo order" 'git-rev-list --topo-order --max-count=10 l5' <<EOF
265
test_output_expect_success "max-count 10 - non topo order" 'git-rev-list --max-count=10 l5' <<EOF
278
test_output_expect_success '--max-age=c3, no --topo-order' "git-rev-list --max-age=$(commit_date c3) l5" <<EOF
118
test_output_expect_success 'multiple heads' 'git rev-list --topo-order a3 b3 c3' <<EOF
135
test_output_expect_success 'multiple heads, prune at a1' 'git rev-list --topo-order a3 b3 c3 ^a1' <<EOF
146
test_output_expect_success 'multiple heads, prune at l1' 'git rev-list --topo-order a3 b3 c3 ^l1' <<EOF
160
test_output_expect_success 'cross-epoch, head at l5, prune at l1' 'git rev-list --topo-order l5 ^l1' <<EOF
179
test_output_expect_success 'duplicated head arguments' 'git rev-list --topo-order l5 l5 ^l1' <<EOF
198
test_output_expect_success 'prune near topo' 'git rev-list --topo-order a4 ^c3' <<EOF
207
test_output_expect_success "head has no parent" 'git rev-list --topo-order root' <<EOF
211
test_output_expect_success "two nodes - one head, one base" 'git rev-list --topo-order l0' <<EOF
216
test_output_expect_success "three nodes one head, one internal, one base" 'git rev-list --topo-order l1' <<EOF
222
test_output_expect_success "linear prune l2 ^root" 'git rev-list --topo-order l2 ^root' <<EOF
228
test_output_expect_success "linear prune l2 ^l0" 'git rev-list --topo-order l2 ^l0' <<EOF
233
test_output_expect_success "linear prune l2 ^l1" 'git rev-list --topo-order l2 ^l1' <<EOF
237
test_output_expect_success "linear prune l5 ^a4" 'git rev-list --topo-order l5 ^a4' <<EOF
243
test_output_expect_success "linear prune l5 ^l3" 'git rev-list --topo-order l5 ^l3' <<EOF
248
test_output_expect_success "linear prune l5 ^l4" 'git rev-list --topo-order l5 ^l4' <<EOF
252
test_output_expect_success "max-count 10 - topo order" 'git rev-list --topo-order --max-count=10 l5' <<EOF
265
test_output_expect_success "max-count 10 - non topo order" 'git rev-list --max-count=10 l5' <<EOF
278
test_output_expect_success '--max-age=c3, no --topo-order' "git rev-list --max-age=$(commit_date c3) l5" <<EOF
303
test_output_expect_success 'one specified head reachable from another a4, c3, --topo-order' "list_duplicates git-rev-list --topo-order a4 c3" <<EOF
306
test_output_expect_success 'one specified head reachable from another c3, a4, --topo-order' "list_duplicates git-rev-list --topo-order c3 a4" <<EOF
309
test_output_expect_success 'one specified head reachable from another a4, c3, no --topo-order' "list_duplicates git-rev-list a4 c3" <<EOF
312
test_output_expect_success 'one specified head reachable from another c3, a4, no --topo-order' "list_duplicates git-rev-list c3 a4" <<EOF
315
test_output_expect_success 'graph with c3 and a4 parents of head' "list_duplicates git-rev-list m1" <<EOF
318
test_output_expect_success 'graph with a4 and c3 parents of head' "list_duplicates git-rev-list m2" <<EOF
321
test_expect_success "head ^head --topo-order" 'git-rev-list --topo-order a3 ^a3' <<EOF
324
test_expect_success "head ^head no --topo-order" 'git-rev-list a3 ^a3' <<EOF
327
test_output_expect_success 'simple topo order (l5r1)' 'git-rev-list --topo-order l5r1' <<EOF
303
test_output_expect_success 'one specified head reachable from another a4, c3, --topo-order' "list_duplicates git rev-list --topo-order a4 c3" <<EOF
306
test_output_expect_success 'one specified head reachable from another c3, a4, --topo-order' "list_duplicates git rev-list --topo-order c3 a4" <<EOF
309
test_output_expect_success 'one specified head reachable from another a4, c3, no --topo-order' "list_duplicates git rev-list a4 c3" <<EOF
312
test_output_expect_success 'one specified head reachable from another c3, a4, no --topo-order' "list_duplicates git rev-list c3 a4" <<EOF
315
test_output_expect_success 'graph with c3 and a4 parents of head' "list_duplicates git rev-list m1" <<EOF
318
test_output_expect_success 'graph with a4 and c3 parents of head' "list_duplicates git rev-list m2" <<EOF
321
test_expect_success "head ^head --topo-order" 'git rev-list --topo-order a3 ^a3' <<EOF
324
test_expect_success "head ^head no --topo-order" 'git rev-list a3 ^a3' <<EOF
327
test_output_expect_success 'simple topo order (l5r1)' 'git rev-list --topo-order l5r1' <<EOF