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>
Phillip Wood committed
Aug 2, 2017 at 11:44 UTC
6f0e577e46619a15baefc48192abee34451effa5
1 file changed
+9
-12
t/t3504-cherry-pick-rerere.sh
+9
-12
@@ -5,14 +5,11 @@ test_description='cherry-pick should rerere for conflicts'
5
. ./test-lib.sh
6
7
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 &&
13
git config rerere.enabled true
14
'
15
@@ -21,10 +18,10 @@ test_expect_success 'conflicting merge' '
18
'
19
20
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^
25
'
26
27
test_expect_success 'cherry-pick conflict' '