summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a6c7a27)
raw | patch | inline | side by side (parent: a6c7a27)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 27 Jan 2009 05:13:00 +0000 (21:13 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 27 Jan 2009 05:33:51 +0000 (21:33 -0800) |
Some shells have issues with a single-shot environment variable export
when invoking a shell function. This fixes the ones I found that invoke
test_must_fail that way.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
when invoking a shell function. This fixes the ones I found that invoke
test_must_fail that way.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3409-rebase-hook.sh | patch | blob | history | |
t/t3412-rebase-root.sh | patch | blob | history |
diff --git a/t/t3409-rebase-hook.sh b/t/t3409-rebase-hook.sh
index 1f1b85067773e40262c2ace48a67b60179663931..098b75507bf2ef6906f3f4fd4c532bb4c55ce7bd 100755 (executable)
--- a/t/t3409-rebase-hook.sh
+++ b/t/t3409-rebase-hook.sh
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)
'
diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh
index ef6f7a54ae23bc58198363b20019a58c54b021fc..3d8ff674c0c153473d5b3cc35ca60e90d7d0be2b 100755 (executable)
--- a/t/t3412-rebase-root.sh
+++ b/t/t3412-rebase-root.sh
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$"
'