summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3fe2bf2)
raw | patch | inline | side by side (parent: 3fe2bf2)
author | Thomas Rast <trast@student.ethz.ch> | |
Fri, 30 Jan 2009 22:47:00 +0000 (23:47 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 31 Jan 2009 05:11:59 +0000 (21:11 -0800) |
a6c7a27 (rebase -i: correctly remember --root flag across --continue,
2009-01-26) introduced a more portable GIT_EDITOR usage, but left the
old tests unchanged.
Since we never use the editor (all tests run the rebase script as
proposed by rebase -i), just disable it outright, which simplifies the
tests.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-26) introduced a more portable GIT_EDITOR usage, but left the
old tests unchanged.
Since we never use the editor (all tests run the rebase script as
proposed by rebase -i), just disable it outright, which simplifies the
tests.
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 9fc528fdea18409fa2871f62ec3b14577b1a55e4..8a9154a422980833d8e59fa018b3d9a18423514f 100755 (executable)
--- a/t/t3412-rebase-root.sh
+++ b/t/t3412-rebase-root.sh
'
. ./test-lib.sh
+# we always run the interactive rebases unchanged, so just disable the editor
+GIT_EDITOR=:
+export GIT_EDITOR
+
test_expect_success 'prepare repository' '
test_commit 1 A &&
test_commit 2 A &&
test_expect_success 'rebase -i --root --onto <newbase>' '
git checkout -b work3 other &&
- GIT_EDITOR=: git rebase -i --root --onto master &&
+ git rebase -i --root --onto master &&
git log --pretty=tformat:"%s" > rebased3 &&
test_cmp expect rebased3
'
test_expect_success 'rebase -i --root --onto <newbase> <branch>' '
git branch work4 other &&
- GIT_EDITOR=: git rebase -i --root --onto master work4 &&
+ git rebase -i --root --onto master work4 &&
git log --pretty=tformat:"%s" > rebased4 &&
test_cmp expect rebased4
'
test_expect_success 'rebase -i -p with linear history' '
git checkout -b work5 other &&
- GIT_EDITOR=: git rebase -i -p --root --onto master &&
+ git rebase -i -p --root --onto master &&
git log --pretty=tformat:"%s" > rebased5 &&
test_cmp expect rebased5
'
test_expect_success 'rebase -i -p with merge' '
git checkout -b work6 other &&
- GIT_EDITOR=: git rebase -i -p --root --onto master &&
+ git rebase -i -p --root --onto master &&
git log --graph --topo-order --pretty=tformat:"%s" > rebased6 &&
test_cmp expect-side rebased6
'
test_expect_success 'rebase -i -p with two roots' '
git checkout -b work7 other &&
- GIT_EDITOR=: git rebase -i -p --root --onto master &&
+ git rebase -i -p --root --onto master &&
git log --graph --topo-order --pretty=tformat:"%s" > rebased7 &&
test_cmp expect-third rebased7
'
test_expect_success 'pre-rebase hook stops rebase' '
git checkout -b stops1 other &&
- (
- GIT_EDITOR=:
- export GIT_EDITOR
- test_must_fail git rebase --root --onto master
- ) &&
+ test_must_fail git rebase --root --onto master &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops1
test 0 = $(git rev-list other...stops1 | wc -l)
'
test_expect_success 'pre-rebase hook stops rebase -i' '
git checkout -b stops2 other &&
- (
- GIT_EDITOR=:
- export GIT_EDITOR
- test_must_fail git rebase --root --onto master
- ) &&
+ test_must_fail git rebase --root --onto master &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops2
test 0 = $(git rev-list other...stops2 | wc -l)
'
test_expect_success 'rebase -i --root with conflict (first part)' '
git checkout -b conflict2 other &&
- (
- GIT_EDITOR=:
- export GIT_EDITOR
- test_must_fail git rebase -i --root --onto master
- ) &&
+ test_must_fail git rebase -i --root --onto master &&
git ls-files -u | grep "B$"
'
test_expect_success 'rebase -i -p --root with conflict (first part)' '
git checkout -b conflict3 other &&
- (
- GIT_EDITOR=:
- export GIT_EDITOR
- test_must_fail git rebase -i -p --root --onto master
- ) &&
+ test_must_fail git rebase -i -p --root --onto master &&
git ls-files -u | grep "B$"
'