Thread (9 messages) flat view 9 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 2/8] t7604-merge-custom-message: show that --log doesn't append to -m

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:48:47
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Tay Ray Chuan <redacted>
---
 t/t7604-merge-custom-message.sh |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh
index d79542d..af53df1 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
-- 
1.7.1.189.g07419
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help