t3407: use test_commit

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>

Phillip Wood committed Sep 13, 2021 at 15:19 UTC e505f452d4e7d0d4b603b1332ad742e74a5d5374
1 file changed +5 -12
t/t3407-rebase-abort.sh
+5 -12
@@ -8,22 +8,15 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8 . ./test-lib.sh
9
10 test_expect_success setup '
11 - echo a > a &&
12 - git add a &&
13 - git commit -m a &&
11 + test_commit a a a &&
12 git branch to-rebase &&
13
16 - echo b > a &&
17 - git commit -a -m b &&
18 - echo c > a &&
19 - git commit -a -m c &&
14 + test_commit b a b &&
15 + test_commit c a c &&
16
17 git checkout to-rebase &&
22 - echo d > a &&
23 - git commit -a -m "merge should fail on this" &&
24 - echo e > a &&
25 - git commit -a -m "merge should fail on this, too" &&
26 - git branch pre-rebase
18 + test_commit "merge should fail on this" a d d &&
19 + test_commit "merge should fail on this, too" a e pre-rebase
20 '
21
22 testrebase() {