{"thread":{"id":"12194","subject":"[PATCH 1/4] Add tests for extra headers in format-patch","startedAt":"2008-02-19T07:40:28Z","lastAt":"2008-02-19T07:40:28Z","messageCount":1,"participants":["Daniel Barkalow"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"69241","messageId":"alpine.LNX.1.00.0802190239380.5816@iabervon.org","threadId":"12194","inReplyTo":null,"subject":"[PATCH 1/4] Add tests for extra headers in format-patch","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-02-19T07:40:28Z","receivedAt":"2008-02-19T07:40:28Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"Presently, it works with each header ending with a newline, but not\nwithout the newlines.\n\nAlso add a test to see that multiple \"To:\" headers get combined.\n\nSigned-off-by: Daniel Barkalow <barkalow@iabervon.org>\n---\n t/t4014-format-patch.sh |   34 ++++++++++++++++++++++++++++++++++\n 1 files changed, 34 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex ac78752..28ab7b9 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -88,6 +88,40 @@ test_expect_success 'replay did not screw up the log message' '\n \n '\n \n+test_expect_success 'extra headers' '\n+\n+\tgit config format.headers \"To: R. E. Cipient <rcipient@example.com>\n+\" &&\n+\tgit config --add format.headers \"Cc: S. E. Cipient <scipient@example.com>\n+\" &&\n+\tgit format-patch --stdout master..side > patch2 &&\n+\tsed -e \"/^$/Q\" patch2 > hdrs2 &&\n+\tgrep \"^To: R. E. Cipient <rcipient@example.com>$\" hdrs2 &&\n+\tgrep \"^Cc: S. E. Cipient <scipient@example.com>$\" hdrs2\n+\t\n+'\n+\n+test_expect_failure 'extra headers without newlines' '\n+\n+\tgit config --replace-all format.headers \"To: R. E. Cipient <rcipient@example.com>\" &&\n+\tgit config --add format.headers \"Cc: S. E. Cipient <scipient@example.com>\" &&\n+\tgit format-patch --stdout master..side >patch3 &&\n+\tsed -e \"/^$/Q\" patch3 > hdrs3 &&\n+\tgrep \"^To: R. E. Cipient <rcipient@example.com>$\" hdrs3 &&\n+\tgrep \"^Cc: S. E. Cipient <scipient@example.com>$\" hdrs3\n+\t\n+'\n+\n+test_expect_failure 'extra headers with multiple To:s' '\n+\n+\tgit config --replace-all format.headers \"To: R. E. Cipient <rcipient@example.com>\" &&\n+\tgit config --add format.headers \"To: S. E. Cipient <scipient@example.com>\" &&\n+\tgit format-patch --stdout master..side > patch4 &&\n+\tsed -e \"/^$/Q\" patch4 > hdrs4 &&\n+\tgrep \"^To: R. E. Cipient <rcipient@example.com>,$\" hdrs4 &&\n+\tgrep \"^ *S. E. Cipient <scipient@example.com>$\" hdrs4\n+'\n+\n test_expect_success 'multiple files' '\n \n \trm -rf patches/ &&\n-- \n1.5.4.1.192.g8ea3a\n"}]}