test_expect_success 'pre-rebase hook stops rebase (2)' '
git checkout test &&
git reset --hard side &&
- EDITOR=true test_must_fail git rebase -i master &&
+ (
+ EDITOR=:
+ export EDITOR
+ test_must_fail git rebase -i master
+ ) &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test 0 = $(git rev-list HEAD...side | wc -l)
'
test_expect_success 'pre-rebase hook stops rebase' '
git checkout -b stops1 other &&
- GIT_EDITOR=: test_must_fail git rebase --root --onto master &&
+ (
+ GIT_EDITOR=:
+ export GIT_EDITOR
+ 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=: test_must_fail git rebase --root --onto master &&
+ (
+ GIT_EDITOR=:
+ export GIT_EDITOR
+ 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=: test_must_fail git rebase -i --root --onto master &&
+ (
+ GIT_EDITOR=:
+ export GIT_EDITOR
+ 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=: test_must_fail git rebase -i -p --root --onto master &&
+ (
+ GIT_EDITOR=:
+ export GIT_EDITOR
+ test_must_fail git rebase -i -p --root --onto master
+ ) &&
git ls-files -u | grep "B$"
'