From bd1470b8cb0cfb42c7de3b9084cdd8ae53aa1d4c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 17 Oct 2012 21:27:22 -0700 Subject: format-patch --notes: show notes after three-dashes When inserting the note after the commit log message to format-patch output, add three dashes before the note. Record the fact that we did so in the rev_info and omit showing duplicated three dashes in the usual codepath that is used when notes are not being shown. Signed-off-by: Junio C Hamano --- t/t4014-format-patch.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index bea63814e6..9750ba6996 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -623,9 +623,12 @@ test_expect_success 'format-patch --signoff' ' test_expect_success 'format-patch --notes --signoff' ' git notes --ref test add -m "test message" HEAD && git format-patch -1 --signoff --stdout --notes=test >out && - # Notes message must come after S-o-b + # Three dashes must come after S-o-b ! sed "/^Signed-off-by: /q" out | grep "test message" && - sed "1,/^Signed-off-by: /d" out | grep "test message" + sed "1,/^Signed-off-by: /d" out | grep "test message" && + # Notes message must come after three dashes + ! sed "/^---$/q" out | grep "test message" && + sed "1,/^---$/d" out | grep "test message" ' echo "fatal: --name-only does not make sense" > expect.name-only -- cgit v1.2.1