]> git.ipfire.org Git - thirdparty/git.git/blame - t/t7604-merge-custom-message.sh
t7604-merge-custom-message: shift expected output creation
[thirdparty/git.git] / t / t7604-merge-custom-message.sh
CommitLineData
c1fb35b9
MV
1#!/bin/sh
2
47a528ad 3test_description='git merge
c1fb35b9
MV
4
5Testing merge when using a custom message for the merge commit.'
6
7. ./test-lib.sh
8
5f35afad
TRC
9create_merge_msgs() {
10 echo >exp.subject "custom message"
11}
12
c1fb35b9
MV
13test_expect_success 'setup' '
14 echo c0 > c0.c &&
15 git add c0.c &&
16 git commit -m c0 &&
17 git tag c0 &&
18 echo c1 > c1.c &&
19 git add c1.c &&
20 git commit -m c1 &&
21 git tag c1 &&
22 git reset --hard c0 &&
23 echo c2 > c2.c &&
24 git add c2.c &&
25 git commit -m c2 &&
5f35afad
TRC
26 git tag c2 &&
27 create_merge_msgs
c1fb35b9
MV
28'
29
c1fb35b9 30
c1fb35b9
MV
31test_expect_success 'merge c2 with a custom message' '
32 git reset --hard c1 &&
5f35afad 33 git merge -m "$(cat exp.subject)" c2 &&
ce9d823b 34 git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
5f35afad 35 test_cmp exp.subject actual
c1fb35b9
MV
36'
37
38test_done