3 test_description
='git merge
5 Testing merge when using a custom message for the merge commit.'
10 echo >exp.subject
"custom message"
12 cp exp.subject exp.log
&&
14 echo >>exp.log
"By A U Thor" &&
15 echo >>exp.log
"* tag 'c2':" &&
19 test_expect_success
'setup' '
28 git reset --hard c0 &&
37 test_expect_success
'merge c2 with a custom message' '
38 git reset --hard c1 &&
39 git merge -m "$(cat exp.subject)" c2 &&
40 git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
41 test_cmp exp.subject actual
44 test_expect_success
'merge --log appends to custom message' '
45 git reset --hard c1 &&
46 git merge --log -m "$(cat exp.subject)" c2 &&
47 git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
48 test_cmp exp.log actual