Skip to content

Commit 77ab58c

Browse files
john-caigitster
authored andcommitted
rebase: use test_commit helper in setup
To prepare for the next commit that will test rebase with oids instead of branch names, update the rebase setup test to add a couple of tags we can use. This uses the test_commit helper so we can replace some lines that add a commit manually. Setting logAllRefUpdates is not necessary because it's on by default for repositories with a working tree. Helped-by: Phillip Wood <[email protected]> Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1a48745 commit 77ab58c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

t/t3400-rebase.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ GIT_AUTHOR_EMAIL=bogus@email@address
1818
export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
1919

2020
test_expect_success 'prepare repository with topic branches' '
21-
git config core.logAllRefUpdates true &&
22-
echo First >A &&
23-
git update-index --add A &&
24-
git commit -m "Add A." &&
21+
test_commit "Add A." A First First &&
2522
git checkout -b force-3way &&
2623
echo Dummy >Y &&
2724
git update-index --add Y &&
@@ -32,9 +29,7 @@ test_expect_success 'prepare repository with topic branches' '
3229
git mv A D/A &&
3330
git commit -m "Move A." &&
3431
git checkout -b my-topic-branch main &&
35-
echo Second >B &&
36-
git update-index --add B &&
37-
git commit -m "Add B." &&
32+
test_commit "Add B." B Second Second &&
3833
git checkout -f main &&
3934
echo Third >>A &&
4035
git update-index A &&

0 commit comments

Comments
 (0)