{"thread":{"id":"14748","subject":"[PATCH] format-patch: Produce better output with --inline or --attach","startedAt":"2008-07-29T23:49:16Z","lastAt":"2008-07-31T05:52:29Z","messageCount":8,"participants":["Kevin Ballard","Jeff King","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"85545","messageId":"1217375356-80287-1-git-send-email-kevin@sb.org","threadId":"14748","inReplyTo":null,"subject":"[PATCH] format-patch: Produce better output with --inline or --attach","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2008-07-29T23:49:16Z","receivedAt":"2008-07-29T23:49:16Z","isPatch":true,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"This patch makes two small changes to improve the output of --inline and --attach.\n\nThe first is to write a newline preceding the boundary. This is needed because\nMIME defines the encapsulation boundary as including the preceding CRLF (or in\nthis case, just LF), so we should be writing one. Without this, the last newline\nin the pre-diff content is consumed instead.\n\nThe second change is to always write the line termination character (default: newline)\neven when using --inline or --attach. This is simply to improve the aesthetics of\nthe resulting message. When using --inline an email client should render the\nresulting message identically to the non-inline version. And when using --attach\nthis adds a blank line preceding the attachment in the email, which is visually\nattractive.\n\nSigned-off-by: Kevin Ballard <kevin@sb.org>\n---\n diff.c                                             |    3 +--\n log-tree.c                                         |    2 +-\n ....format-patch_--attach_--stdout_initial..master |    6 ++++++\n ...format-patch_--attach_--stdout_initial..master^ |    4 ++++\n ...ff.format-patch_--attach_--stdout_initial..side |    2 ++\n ...tdout_--subject-prefix=TESTCASE_initial..master |    6 ++++++\n ....format-patch_--inline_--stdout_initial..master |    6 ++++++\n ...format-patch_--inline_--stdout_initial..master^ |    4 ++++\n ...ormat-patch_--inline_--stdout_initial..master^^ |    2 ++\n ...ff.format-patch_--inline_--stdout_initial..side |    2 ++\n 10 files changed, 34 insertions(+), 3 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex a07812c..cbf2547 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3223,11 +3223,10 @@ void diff_flush(struct diff_options *options)\n \n \tif (output_format & DIFF_FORMAT_PATCH) {\n \t\tif (separator) {\n+\t\t\tputc(options->line_termination, options->file);\n \t\t\tif (options->stat_sep) {\n \t\t\t\t/* attach patch instead of inline */\n \t\t\t\tfputs(options->stat_sep, options->file);\n-\t\t\t} else {\n-\t\t\t\tputc(options->line_termination, options->file);\n \t\t\t}\n \t\t}\n \ndiff --git a/log-tree.c b/log-tree.c\nindex 5505606..bd8b9e4 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -198,7 +198,7 @@ void log_write_email_headers(struct rev_info *opt, const char *name,\n \t\textra_headers = subject_buffer;\n \n \t\tsnprintf(buffer, sizeof(buffer) - 1,\n-\t\t\t \"--%s%s\\n\"\n+\t\t\t \"\\n--%s%s\\n\"\n \t\t\t \"Content-Type: text/x-patch;\"\n \t\t\t \" name=\\\"%s.diff\\\"\\n\"\n \t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..master\nindex cf6891f..43346b9 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\nindex fe02587..d7490a9 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..side b/t/t4013/diff.format-patch_--attach_--stdout_initial..side\nindex 9ff828e..38f7902 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..side\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..side\n@@ -17,6 +17,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\nindex a8093be..fca5cce 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..master\nindex aa110c0..6d6fac3 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\nindex 95e9ea4..18a1110 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\nindex b8e81e1..4f258b8 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..side b/t/t4013/diff.format-patch_--inline_--stdout_initial..side\nindex 86ae923..e86dce6 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..side\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..side\n@@ -17,6 +17,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\n-- \n1.6.0.rc1.166.gbbfa8.dirty\n"},{"id":"85576","messageId":"20080730052401.GC4034@sigill.intra.peff.net","threadId":"14748","inReplyTo":"1217375356-80287-1-git-send-email-kevin@sb.org","subject":"Re: [PATCH] format-patch: Produce better output with --inline or --attach","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-07-30T05:24:01Z","receivedAt":"2008-07-30T05:24:01Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jul 29, 2008 at 04:49:16PM -0700, Kevin Ballard wrote:\n\n> The first is to write a newline preceding the boundary. This is needed\n> because MIME defines the encapsulation boundary as including the\n> preceding CRLF (or in this case, just LF), so we should be writing\n> one. Without this, the last newline in the pre-diff content is\n> consumed instead.\n\nHmm. I am surprised we haven't had more bug reports about this, but\nperhaps these features aren't used too frequently. But I double checked\nthe MIME specs just to be sure, and you are definitely right.\n\n> The second change is to always write the line termination character (default: newline)\n\nCan you please wrap your commit messages at some more reasonable length?\nThis line is 86 characters long.\n\n-Peff\n"},{"id":"85581","messageId":"1217396973-82246-1-git-send-email-kevin@sb.org","threadId":"14748","inReplyTo":"20080730052401.GC4034@sigill.intra.peff.net","subject":"[PATCH] format-patch: Produce better output with --inline or --attach","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2008-07-30T05:49:33Z","receivedAt":"2008-07-30T05:49:33Z","isPatch":true,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"This patch makes two small changes to improve the output of --inline\nand --attach.\n\nThe first is to write a newline preceding the boundary. This is needed because\nMIME defines the encapsulation boundary as including the preceding CRLF (or in\nthis case, just LF), so we should be writing one. Without this, the last\nnewline in the pre-diff content is consumed instead.\n\nThe second change is to always write the line termination character\n(default: newline) even when using --inline or --attach. This is simply to\nimprove the aesthetics of the resulting message. When using --inline an email\nclient should render the resulting message identically to the non-inline\nversion. And when using --attach this adds a blank line preceding the\nattachment in the email, which is visually attractive.\n\nSigned-off-by: Kevin Ballard <kevin@sb.org>\n---\n diff.c                                             |    3 +--\n log-tree.c                                         |    2 +-\n ....format-patch_--attach_--stdout_initial..master |    6 ++++++\n ...format-patch_--attach_--stdout_initial..master^ |    4 ++++\n ...ff.format-patch_--attach_--stdout_initial..side |    2 ++\n ...tdout_--subject-prefix=TESTCASE_initial..master |    6 ++++++\n ....format-patch_--inline_--stdout_initial..master |    6 ++++++\n ...format-patch_--inline_--stdout_initial..master^ |    4 ++++\n ...ormat-patch_--inline_--stdout_initial..master^^ |    2 ++\n ...ff.format-patch_--inline_--stdout_initial..side |    2 ++\n 10 files changed, 34 insertions(+), 3 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex a07812c..cbf2547 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3223,11 +3223,10 @@ void diff_flush(struct diff_options *options)\n \n \tif (output_format & DIFF_FORMAT_PATCH) {\n \t\tif (separator) {\n+\t\t\tputc(options->line_termination, options->file);\n \t\t\tif (options->stat_sep) {\n \t\t\t\t/* attach patch instead of inline */\n \t\t\t\tfputs(options->stat_sep, options->file);\n-\t\t\t} else {\n-\t\t\t\tputc(options->line_termination, options->file);\n \t\t\t}\n \t\t}\n \ndiff --git a/log-tree.c b/log-tree.c\nindex 5505606..bd8b9e4 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -198,7 +198,7 @@ void log_write_email_headers(struct rev_info *opt, const char *name,\n \t\textra_headers = subject_buffer;\n \n \t\tsnprintf(buffer, sizeof(buffer) - 1,\n-\t\t\t \"--%s%s\\n\"\n+\t\t\t \"\\n--%s%s\\n\"\n \t\t\t \"Content-Type: text/x-patch;\"\n \t\t\t \" name=\\\"%s.diff\\\"\\n\"\n \t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..master\nindex cf6891f..43346b9 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\nindex fe02587..d7490a9 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..side b/t/t4013/diff.format-patch_--attach_--stdout_initial..side\nindex 9ff828e..38f7902 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..side\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..side\n@@ -17,6 +17,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\nindex a8093be..fca5cce 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..master\nindex aa110c0..6d6fac3 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -122,6 +126,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\nindex 95e9ea4..18a1110 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n@@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit\n  file1   |    3 +++\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\nindex b8e81e1..4f258b8 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^\n@@ -19,6 +19,8 @@ This is the second commit.\n  file2   |    3 ---\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..side b/t/t4013/diff.format-patch_--inline_--stdout_initial..side\nindex 86ae923..e86dce6 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..side\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..side\n@@ -17,6 +17,8 @@ Content-Transfer-Encoding: 8bit\n  file3   |    4 ++++\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n+\n+\n --------------g-i-t--v-e-r-s-i-o-n\n Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\n-- \n1.6.0.rc1.166.gbbfa8\n"},{"id":"85629","messageId":"alpine.LSU.1.00.0807301624410.3486@wbgn129.biozentrum.uni-wuerzburg.de","threadId":"14748","inReplyTo":"1217396973-82246-1-git-send-email-kevin@sb.org","subject":"Re: [PATCH] format-patch: Produce better output with --inline or --attach","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-30T14:29:39Z","receivedAt":"2008-07-30T14:29:39Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 29 Jul 2008, Kevin Ballard wrote:\n\n> MIME defines the encapsulation boundary as including the preceding CRLF (or in\n\nThis line will still be too long in git log's output, as well as in git \nshortlog's output.  I thought we had a suggestion to use at most 76 \ncharacters per line in SubmittingPatches, but apparently we don't.\n\n> The second change is to always write the line termination character \n> (default: newline) even when using --inline or --attach. This is simply \n> to improve the aesthetics of the resulting message. When using --inline \n> an email client should render the resulting message identically to the \n> non-inline version. And when using --attach this adds a blank line \n> preceding the attachment in the email, which is visually attractive.\n\nIt appears that your patch has one uncontroversial and one controversial \npart, then.\n\nCiao,\nDscho\n"},{"id":"85660","messageId":"B805BDA1-6C22-4488-B5F5-6DA8CC729C06@sb.org","threadId":"14748","inReplyTo":"alpine.LSU.1.00.0807301624410.3486@wbgn129.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] format-patch: Produce better output with --inline or --attach","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2008-07-30T18:30:32Z","receivedAt":"2008-07-30T18:30:32Z","isPatch":true,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"On Jul 30, 2008, at 7:29 AM, Johannes Schindelin wrote:\n\n> Hi,\n>\n> On Tue, 29 Jul 2008, Kevin Ballard wrote:\n>\n>> MIME defines the encapsulation boundary as including the preceding  \n>> CRLF (or in\n>\n> This line will still be too long in git log's output, as well as in  \n> git\n> shortlog's output.  I thought we had a suggestion to use at most 76\n> characters per line in SubmittingPatches, but apparently we don't.\n\nGood point. I'll send another re-wrapped patch.\n\n>> The second change is to always write the line termination character\n>> (default: newline) even when using --inline or --attach. This is  \n>> simply\n>> to improve the aesthetics of the resulting message. When using -- \n>> inline\n>> an email client should render the resulting message identically to  \n>> the\n>> non-inline version. And when using --attach this adds a blank line\n>> preceding the attachment in the email, which is visually attractive.\n>\n> It appears that your patch has one uncontroversial and one  \n> controversial\n> part, then.\n\nIs this controversial? Nobody's objected so far. My goal with this  \nchange is to make the --inline output render exactly the same as the  \ndefault output in a mail client. I can't think of any downside.\n\n-Kevin Ballard\n\n-- \nKevin Ballard\nhttp://kevin.sb.org\nkevin@sb.org\nhttp://www.tildesoft.com\n"},{"id":"85663","messageId":"17D98C67-D876-455A-AA81-2118A8554A50@sb.org","threadId":"14748","inReplyTo":"B805BDA1-6C22-4488-B5F5-6DA8CC729C06@sb.org","subject":"Re: [PATCH] format-patch: Produce better output with --inline or --attach","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2008-07-30T18:37:27Z","receivedAt":"2008-07-30T18:37:27Z","isPatch":true,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"On Jul 30, 2008, at 11:30 AM, Kevin Ballard wrote:\n\n>> Hi,\n>>\n>> On Tue, 29 Jul 2008, Kevin Ballard wrote:\n>>\n>>> MIME defines the encapsulation boundary as including the preceding  \n>>> CRLF (or in\n>>\n>> This line will still be too long in git log's output, as well as in  \n>> git\n>> shortlog's output.  I thought we had a suggestion to use at most 76\n>> characters per line in SubmittingPatches, but apparently we don't.\n>\n> Good point. I'll send another re-wrapped patch.\n\nNevermind, looks like the previous one was already applied.\n\n-Kevin Ballard\n\n-- \nKevin Ballard\nhttp://kevin.sb.org\nkevin@sb.org\nhttp://www.tildesoft.com\n"},{"id":"85664","messageId":"7vmyjz5hmc.fsf@gitster.siamese.dyndns.org","threadId":"14748","inReplyTo":"alpine.LSU.1.00.0807301624410.3486@wbgn129.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] format-patch: Produce better output with --inline or --attach","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-30T18:52:59Z","receivedAt":"2008-07-30T18:52:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> The second change is to always write the line termination character \n>> (default: newline) even when using --inline or --attach. This is simply \n>> to improve the aesthetics of the resulting message. When using --inline \n>> an email client should render the resulting message identically to the \n>> non-inline version. And when using --attach this adds a blank line \n>> preceding the attachment in the email, which is visually attractive.\n>\n> It appears that your patch has one uncontroversial and one controversial \n> part, then.\n\nCould you elaborate what's controversial about this?\n"},{"id":"85726","messageId":"20080731055229.GB17652@sigill.intra.peff.net","threadId":"14748","inReplyTo":"B805BDA1-6C22-4488-B5F5-6DA8CC729C06@sb.org","subject":"Re: [PATCH] format-patch: Produce better output with --inline or --attach","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-07-31T05:52:29Z","receivedAt":"2008-07-31T05:52:29Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jul 30, 2008 at 11:30:32AM -0700, Kevin Ballard wrote:\n\n>>> The second change is to always write the line termination character\n>>> (default: newline) even when using --inline or --attach. This is  \n>> It appears that your patch has one uncontroversial and one  \n>> controversial\n>> part, then.\n> Is this controversial? Nobody's objected so far. My goal with this change \n> is to make the --inline output render exactly the same as the default \n> output in a mail client. I can't think of any downside.\n\nNo. I didn't comment on it in my earlier response because I don't really\ncare. But I certainly have no problem with it, and it is probably an\nimprovement.\n\n-Peff\n"}]}