summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2017-08-02 10:44:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-02 22:16:09 (GMT)
commit6f0e577e46619a15baefc48192abee34451effa5 (patch)
tree2c6762064b2b9902cebd2509fc0ff8e858ba2042
parent9b6d7a6245e3be34a50a94a1174d8aebf5b1a263 (diff)
downloadgit-6f0e577e46619a15baefc48192abee34451effa5.zip
git-6f0e577e46619a15baefc48192abee34451effa5.tar.gz
git-6f0e577e46619a15baefc48192abee34451effa5.tar.bz2
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>
-rwxr-xr-xt/t3504-cherry-pick-rerere.sh21
1 files changed, 9 insertions, 12 deletions
diff --git a/t/t3504-cherry-pick-rerere.sh b/t/t3504-cherry-pick-rerere.sh
index e6a6481..33f902b 100755
--- a/t/t3504-cherry-pick-rerere.sh
+++ b/t/t3504-cherry-pick-rerere.sh
@@ -5,14 +5,11 @@ test_description='cherry-pick should rerere for conflicts'
. ./test-lib.sh
test_expect_success setup '
- echo foo >foo &&
- git add foo && test_tick && git commit -q -m 1 &&
- echo foo-master >foo &&
- git add foo && test_tick && git commit -q -m 2 &&
-
- git checkout -b dev HEAD^ &&
- echo foo-dev >foo &&
- git add foo && test_tick && git commit -q -m 3 &&
+ test_commit foo &&
+ test_commit foo-master foo &&
+
+ git checkout -b dev foo &&
+ test_commit foo-dev foo &&
git config rerere.enabled true
'
@@ -21,10 +18,10 @@ test_expect_success 'conflicting merge' '
'
test_expect_success 'fixup' '
- echo foo-dev >foo &&
- git add foo && test_tick && git commit -q -m 4 &&
- git reset --hard HEAD^ &&
- echo foo-dev >expect
+ echo foo-resolved >foo &&
+ git commit -am resolved &&
+ cp foo expect &&
+ git reset --hard HEAD^
'
test_expect_success 'cherry-pick conflict' '