]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t3407: use test_commit
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Mon, 13 Sep 2021 15:19:13 +0000 (15:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Sep 2021 19:47:06 +0000 (12:47 -0700)
Simplify the setup by using test_commit. Note that this replaces the
branch "pre-rebase" with a tag of the same name. "pre-rebase" is only
used as a fixed reference point so it makes sense to use a tag rather
than a branch.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3407-rebase-abort.sh

index c747bd31d76cce36e38f3e838d993e876297c862..0ad21966bc51c5c46dfeacbd8fa58a4cdfae0232 100755 (executable)
@@ -8,22 +8,15 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 . ./test-lib.sh
 
 test_expect_success setup '
-       echo a > a &&
-       git add a &&
-       git commit -m a &&
+       test_commit a a a &&
        git branch to-rebase &&
 
-       echo b > a &&
-       git commit -a -m b &&
-       echo c > a &&
-       git commit -a -m c &&
+       test_commit b a b &&
+       test_commit c a c &&
 
        git checkout to-rebase &&
-       echo d > a &&
-       git commit -a -m "merge should fail on this" &&
-       echo e > a &&
-       git commit -a -m "merge should fail on this, too" &&
-       git branch pre-rebase
+       test_commit "merge should fail on this" a d d &&
+       test_commit "merge should fail on this, too" a e pre-rebase
 '
 
 testrebase() {