summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e80f97e)
raw | patch | inline | side by side (parent: e80f97e)
author | Thomas Rast <trast@student.ethz.ch> | |
Fri, 30 Jan 2009 22:47:01 +0000 (23:47 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 2 Feb 2009 02:54:04 +0000 (18:54 -0800) |
Replace all 'git log --graph' calls for history verification with the
combination of 'git log ...| git name-rev' first introduced by a6c7a27
(rebase -i: correctly remember --root flag across --continue,
2009-01-26). This should be less susceptible to format changes than
the --graph code.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
combination of 'git log ...| git name-rev' first introduced by a6c7a27
(rebase -i: correctly remember --root flag across --continue,
2009-01-26). This should be less susceptible to format changes than
the --graph code.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3412-rebase-root.sh | patch | blob | history |
diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh
index 8a9154a422980833d8e59fa018b3d9a18423514f..57a3cad2d93b472aaea5542e39c2171c2542bef6 100755 (executable)
--- a/t/t3412-rebase-root.sh
+++ b/t/t3412-rebase-root.sh
GIT_EDITOR=:
export GIT_EDITOR
+log_with_names () {
+ git rev-list --topo-order --parents --pretty="tformat:%s" HEAD |
+ git name-rev --stdin --name-only --refs=refs/heads/$1
+}
+
+
test_expect_success 'prepare repository' '
test_commit 1 A &&
test_commit 2 A &&
git merge side
'
-sed 's/#/ /g' > expect-side <<'EOF'
-* Merge branch 'side' into other
-|\##
-| * 5
-* | 4
-|/##
-* 3
-* 2
-* 1
+cat > expect-side <<'EOF'
+commit work6 work6~1 work6^2
+Merge branch 'side' into other
+commit work6^2 work6~2
+5
+commit work6~1 work6~2
+4
+commit work6~2 work6~3
+3
+commit work6~3 work6~4
+2
+commit work6~4
+1
EOF
test_expect_success 'rebase -i -p with merge' '
git checkout -b work6 other &&
git rebase -i -p --root --onto master &&
- git log --graph --topo-order --pretty=tformat:"%s" > rebased6 &&
+ log_with_names work6 > rebased6 &&
test_cmp expect-side rebased6
'
git merge third
'
-sed 's/#/ /g' > expect-third <<'EOF'
-* Merge branch 'third' into other
-|\##
-| * 6
-* | Merge branch 'side' into other
-|\ \##
-| * | 5
-* | | 4
-|/ /##
-* | 3
-|/##
-* 2
-* 1
+cat > expect-third <<'EOF'
+commit work7 work7~1 work7^2
+Merge branch 'third' into other
+commit work7^2 work7~4
+6
+commit work7~1 work7~2 work7~1^2
+Merge branch 'side' into other
+commit work7~1^2 work7~3
+5
+commit work7~2 work7~3
+4
+commit work7~3 work7~4
+3
+commit work7~4 work7~5
+2
+commit work7~5
+1
EOF
test_expect_success 'rebase -i -p with two roots' '
git checkout -b work7 other &&
git rebase -i -p --root --onto master &&
- git log --graph --topo-order --pretty=tformat:"%s" > rebased7 &&
+ log_with_names work7 > rebased7 &&
test_cmp expect-third rebased7
'
test_expect_success 'rebase -i -p --root with conflict (second part)' '
git rebase --continue &&
- git rev-list --topo-order --parents --pretty="tformat:%s" HEAD |
- git name-rev --stdin --name-only --refs=refs/heads/conflict3 >out &&
+ log_with_names conflict3 >out &&
test_cmp expect-conflict-p out
'