Skip to content

Commit 6f0e577

Browse files
phillipwoodgitster
authored andcommitted
t3504: use test_commit
Using test_commit is simpler than chaining echo && git add && test_tick && commit. Also having tags makes it clearer which commit is being selecting by reset. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 9b6d7a6 commit 6f0e577

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

t/t3504-cherry-pick-rerere.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ test_description='cherry-pick should rerere for conflicts'
55
. ./test-lib.sh
66

77
test_expect_success setup '
8-
echo foo >foo &&
9-
git add foo && test_tick && git commit -q -m 1 &&
10-
echo foo-master >foo &&
11-
git add foo && test_tick && git commit -q -m 2 &&
12-
13-
git checkout -b dev HEAD^ &&
14-
echo foo-dev >foo &&
15-
git add foo && test_tick && git commit -q -m 3 &&
8+
test_commit foo &&
9+
test_commit foo-master foo &&
10+
11+
git checkout -b dev foo &&
12+
test_commit foo-dev foo &&
1613
git config rerere.enabled true
1714
'
1815

@@ -21,10 +18,10 @@ test_expect_success 'conflicting merge' '
2118
'
2219

2320
test_expect_success 'fixup' '
24-
echo foo-dev >foo &&
25-
git add foo && test_tick && git commit -q -m 4 &&
26-
git reset --hard HEAD^ &&
27-
echo foo-dev >expect
21+
echo foo-resolved >foo &&
22+
git commit -am resolved &&
23+
cp foo expect &&
24+
git reset --hard HEAD^
2825
'
2926

3027
test_expect_success 'cherry-pick conflict' '

0 commit comments

Comments
 (0)