summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-17 21:27:22 -0700
committerJunio C Hamano <gitster@pobox.com>2012-10-17 22:42:40 -0700
commitbd1470b8cb0cfb42c7de3b9084cdd8ae53aa1d4c (patch)
tree9bcc985a19574ae25c5edf4743341d3f7dfc3856 /t
parent212620fe7e74f6bd4a30a5a39d7c7b3f685ef888 (diff)
downloadgit-bd1470b8cb0cfb42c7de3b9084cdd8ae53aa1d4c.tar.gz
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 <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4014-format-patch.sh7
1 files changed, 5 insertions, 2 deletions
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