test_description='Tests git-rev-list --topo-order functionality'
. ./test-lib.sh
-. ../t6000-lib.sh # t6xxx specific functions
+. ../t6000lib.sh # t6xxx specific functions
list_duplicates()
{
}
date >path0
-git-update-cache --add path0
+git-update-index --add path0
save_tag tree git-write-tree
on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree
on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root
on_committer_date "1971-08-16 00:00:06" save_tag b1 unique_commit b1 tree -p a0
on_committer_date "1971-08-16 00:00:07" save_tag c1 unique_commit c1 tree -p b1
on_committer_date "1971-08-16 00:00:08" as_author foobar@example.com save_tag b2 unique_commit b2 tree -p b1
-on_committer_date "1971-08-16 00:00:09" save_tag b3 unique_commit b2 tree -p b2
+on_committer_date "1971-08-16 00:00:09" save_tag b3 unique_commit b3 tree -p b2
on_committer_date "1971-08-16 00:00:10" save_tag c2 unique_commit c2 tree -p c1 -p b2
on_committer_date "1971-08-16 00:00:11" save_tag c3 unique_commit c3 tree -p c2
on_committer_date "1971-08-16 00:00:12" save_tag a2 unique_commit a2 tree -p a1
save_tag g3 unique_commit g5 tree -p g2
save_tag g4 unique_commit g6 tree -p g3 -p h2
-tag l5 > .git/HEAD
+git-update-ref HEAD $(tag l5)
-#
-# cd to t/trash and use
-#
-# git-rev-list ... 2>&1 | sed "$(cat sed.script)"
-#
-# if you ever want to manually debug the operation of git-rev-list
-#
-echo "$sed_script" | tr ' ' \\012 > sed.script
-
-test_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -s " "' <<EOF
+test_output_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -d \" \"' <<EOF
19
EOF
EOF
test_output_expect_success 'multiple heads' 'git-rev-list --topo-order a3 b3 c3' <<EOF
-b3
+a3
+a2
+a1
c3
c2
-b2
c1
+b3
+b2
b1
-a3
-a2
-a1
a0
l2
l1
EOF
test_output_expect_success 'multiple heads, prune at a1' 'git-rev-list --topo-order a3 b3 c3 ^a1' <<EOF
-b3
+a3
+a2
c3
c2
-b2
c1
+b3
+b2
b1
-a3
-a2
EOF
test_output_expect_success 'multiple heads, prune at l1' 'git-rev-list --topo-order a3 b3 c3 ^l1' <<EOF
-b3
+a3
+a2
+a1
c3
c2
-b2
c1
+b3
+b2
b1
-a3
-a2
-a1
a0
l2
EOF