From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <junio@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH 1/2] t3412: clean up GIT_EDITOR usage
Date: Fri, 30 Jan 2009 23:47:00 +0100 [thread overview]
Message-ID: <1233355621-4783-1-git-send-email-trast@student.ethz.ch> (raw)
In-Reply-To: <200901302343.39921.trast@student.ethz.ch>
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>
---
t/t3412-rebase-root.sh | 38 +++++++++++++-------------------------
1 files changed, 13 insertions(+), 25 deletions(-)
diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh
index 9fc528f..8a9154a 100755
--- a/t/t3412-rebase-root.sh
+++ b/t/t3412-rebase-root.sh
@@ -6,6 +6,10 @@ Tests if git rebase --root --onto <newparent> can rebase the root commit.
'
. ./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 &&
@@ -59,7 +63,7 @@ test_expect_success 'pre-rebase got correct input (2)' '
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
'
@@ -70,7 +74,7 @@ test_expect_success 'pre-rebase got correct input (3)' '
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
'
@@ -81,7 +85,7 @@ test_expect_success 'pre-rebase got correct input (4)' '
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
'
@@ -111,7 +115,7 @@ EOF
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
'
@@ -142,7 +146,7 @@ EOF
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
'
@@ -158,22 +162,14 @@ EOF
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)
'
@@ -218,11 +214,7 @@ test_expect_success 'rebase --root with conflict (second part)' '
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$"
'
@@ -260,11 +252,7 @@ EOF
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$"
'
--
1.6.1.2.464.g6066
next prev parent reply other threads:[~2009-01-30 22:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-25 23:31 [PATCH 0/2] rebase -i --root cleanups Johannes Schindelin
2009-01-25 23:31 ` [PATCH 1/2] rebase -i --root: simplify code Johannes Schindelin
2009-01-25 23:49 ` Thomas Rast
2009-01-25 23:53 ` Thomas Rast
2009-01-26 5:54 ` Junio C Hamano
2009-01-26 9:05 ` [PATCH] rebase -i: correctly remember --root flag across --continue Thomas Rast
2009-01-26 20:47 ` Junio C Hamano
2009-01-26 21:05 ` Junio C Hamano
2009-01-26 21:09 ` Jeff King
2009-01-26 21:12 ` Jeff King
2009-01-26 21:28 ` Thomas Rast
2009-01-27 0:29 ` Junio C Hamano
2009-01-26 21:49 ` Junio C Hamano
2009-01-30 22:43 ` Thomas Rast
2009-01-30 22:47 ` Thomas Rast [this message]
2009-01-30 22:47 ` [PATCH 2/2] t3412: use log|name-rev instead of log --graph Thomas Rast
2009-02-01 22:24 ` [PATCH 1/2] t3412: clean up GIT_EDITOR usage Johannes Schindelin
2009-02-02 8:39 ` Thomas Rast
2009-01-26 0:44 ` [PATCH 1/2] rebase -i --root: simplify code Johannes Schindelin
2009-01-25 23:32 ` [PATCH 2/2] rebase -i --root: fix check for number of arguments Johannes Schindelin
2009-01-26 0:07 ` Thomas Rast
2009-01-26 0:49 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233355621-4783-1-git-send-email-trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=junio@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).