aboutsummaryrefslogtreecommitdiff
path: root/t/t3412-rebase-root.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-01-27 23:35:09 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-28 20:17:46 -0800
commitf7951e1d97aeb7b3ed359faeab5edf9e870ec8a5 (patch)
tree54f249c31e0dadd4cb31b7e37cc6ba0ba2aa09d5 /t/t3412-rebase-root.sh
parent37e5c8f46042510176a71d73c903c44214e09815 (diff)
downloadgit-f7951e1d97aeb7b3ed359faeab5edf9e870ec8a5.tar.gz
git-f7951e1d97aeb7b3ed359faeab5edf9e870ec8a5.tar.xz
Simplify t3412
Use the newly introduced test_commit() and test_merge() helpers. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3412-rebase-root.sh')
-rwxr-xr-xt/t3412-rebase-root.sh28
1 files changed, 7 insertions, 21 deletions
diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh
index 3d8ff674c..9fc528fde 100755
--- a/t/t3412-rebase-root.sh
+++ b/t/t3412-rebase-root.sh
@@ -7,23 +7,13 @@ Tests if git rebase --root --onto <newparent> can rebase the root commit.
. ./test-lib.sh
test_expect_success 'prepare repository' '
- echo 1 > A &&
- git add A &&
- git commit -m 1 &&
- echo 2 > A &&
- git add A &&
- git commit -m 2 &&
+ test_commit 1 A &&
+ test_commit 2 A &&
git symbolic-ref HEAD refs/heads/other &&
rm .git/index &&
- echo 3 > B &&
- git add B &&
- git commit -m 3 &&
- echo 1 > A &&
- git add A &&
- git commit -m 1b &&
- echo 4 > B &&
- git add B &&
- git commit -m 4
+ test_commit 3 B &&
+ test_commit 1b A 1 &&
+ test_commit 4 B
'
test_expect_success 'rebase --root expects --onto' '
@@ -103,9 +93,7 @@ test_expect_success 'pre-rebase got correct input (5)' '
test_expect_success 'set up merge history' '
git checkout other^ &&
git checkout -b side &&
- echo 5 > C &&
- git add C &&
- git commit -m 5 &&
+ test_commit 5 C &&
git checkout other &&
git merge side
'
@@ -132,9 +120,7 @@ test_expect_success 'set up second root and merge' '
git symbolic-ref HEAD refs/heads/third &&
rm .git/index &&
rm A B C &&
- echo 6 > D &&
- git add D &&
- git commit -m 6 &&
+ test_commit 6 D &&
git checkout other &&
git merge third
'