File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ Testing merge when using a custom message for the merge commit.'
6
6
7
7
. ./test-lib.sh
8
8
9
+ create_merge_msgs () {
10
+ echo > exp.subject " custom message"
11
+ }
12
+
9
13
test_expect_success ' setup' '
10
14
echo c0 > c0.c &&
11
15
git add c0.c &&
@@ -19,16 +23,16 @@ test_expect_success 'setup' '
19
23
echo c2 > c2.c &&
20
24
git add c2.c &&
21
25
git commit -m c2 &&
22
- git tag c2
26
+ git tag c2 &&
27
+ create_merge_msgs
23
28
'
24
29
25
30
26
31
test_expect_success ' merge c2 with a custom message' '
27
32
git reset --hard c1 &&
28
- echo >expected "custom message" &&
29
- git merge -m "custom message" c2 &&
33
+ git merge -m "$(cat exp.subject)" c2 &&
30
34
git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
31
- test_cmp expected actual
35
+ test_cmp exp.subject actual
32
36
'
33
37
34
38
test_done
You can’t perform that action at this time.
0 commit comments