t7604-merge-custom-message: show that --log doesn't append to -m
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tay Ray Chuan committed
May 11, 2010 at 01:17 UTC
d4e6c4bdc3e065f738b0c2fc47d9fe9c3778d746
1 file changed
+12
t/t7604-merge-custom-message.sh
+12
@@ -8,6 +8,11 @@ Testing merge when using a custom message for the merge commit.'
8
9
create_merge_msgs() {
10
echo >exp.subject "custom message"
11
+
12
+ cp exp.subject exp.log &&
13
+ echo >>exp.log "" &&
14
+ echo >>exp.log "* commit 'c2':" &&
15
+ echo >>exp.log " c2"
16
}
17
18
test_expect_success 'setup' '
@@ -35,4 +40,11 @@ test_expect_success 'merge c2 with a custom message' '
40
test_cmp exp.subject actual
41
'
42
43
+test_expect_failure 'merge --log appends to custom message' '
44
+ git reset --hard c1 &&
45
+ git merge --log -m "$(cat exp.subject)" c2 &&
46
+ git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
47
+ test_cmp exp.log actual
48
+'
49
+
50
test_done