summaryrefslogtreecommitdiff
path: root/t/t7604-merge-custom-message.sh
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-05-11 01:17:46 +0800
committerJunio C Hamano <gitster@pobox.com>2010-05-10 11:57:32 -0700
commitd4e6c4bdc3e065f738b0c2fc47d9fe9c3778d746 (patch)
tree684cf41e78cf12ee241c6571a8b0d19a5b89a759 /t/t7604-merge-custom-message.sh
parent5f35afadb032e1d2585f6f0246bf05f2e4e49c27 (diff)
downloadgit-d4e6c4bdc3e065f738b0c2fc47d9fe9c3778d746.tar.gz
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>
Diffstat (limited to 't/t7604-merge-custom-message.sh')
-rwxr-xr-xt/t7604-merge-custom-message.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh
index d79542d847..af53df1c1b 100755
--- a/t/t7604-merge-custom-message.sh
+++ b/t/t7604-merge-custom-message.sh
@@ -8,6 +8,11 @@ Testing merge when using a custom message for the merge commit.'
create_merge_msgs() {
echo >exp.subject "custom message"
+
+ cp exp.subject exp.log &&
+ echo >>exp.log "" &&
+ echo >>exp.log "* commit 'c2':" &&
+ echo >>exp.log " c2"
}
test_expect_success 'setup' '
@@ -35,4 +40,11 @@ test_expect_success 'merge c2 with a custom message' '
test_cmp exp.subject actual
'
+test_expect_failure 'merge --log appends to custom message' '
+ git reset --hard c1 &&
+ git merge --log -m "$(cat exp.subject)" c2 &&
+ git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
+ test_cmp exp.log actual
+'
+
test_done