diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-11-15 10:25:05 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-11-15 10:25:05 -0800 |
commit | 4ad4fce63a67cde3a93e6678724ed79b06109ad6 (patch) | |
tree | 6993697c9b9a6ee8916d620a1e177fea8a636b32 /t | |
parent | Merge branch 'mg/maint-pull-suggest-upstream-to' (diff) | |
parent | format-patch: add a blank line between notes and diffstat (diff) | |
download | tgif-4ad4fce63a67cde3a93e6678724ed79b06109ad6.tar.xz |
Merge branch 'jc/prettier-pretty-note'
Emit the notes attached to the commit in "format-patch --notes"
output after three-dashes.
* jc/prettier-pretty-note:
format-patch: add a blank line between notes and diffstat
Doc User-Manual: Patch cover letter, three dashes, and --notes
Doc format-patch: clarify --notes use case
Doc notes: Include the format-patch --notes option
Doc SubmittingPatches: Mention --notes option after "cover letter"
Documentation: decribe format-patch --notes
format-patch --notes: show notes after three-dashes
format-patch: append --signature after notes
pretty_print_commit(): do not append notes message
pretty: prepare notes message at a centralized place
format_note(): simplify API
pretty: remove reencode_commit_message()
Diffstat (limited to 't')
-rwxr-xr-x | t/t4014-format-patch.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index ad9f69e607..16a4ca1d60 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -650,8 +650,19 @@ test_expect_success 'format-patch --in-reply-to' ' ' test_expect_success 'format-patch --signoff' ' - git format-patch -1 --signoff --stdout | - grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" + git format-patch -1 --signoff --stdout >out && + grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" out +' + +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 && + # 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" && + # 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 |