{"thread":{"id":"11919","subject":"[PATCH 3/4] Retain extra blank lines between the summary and the body","startedAt":"2008-02-06T16:43:24Z","lastAt":"2008-02-07T09:09:51Z","messageCount":4,"participants":["Daniel Barkalow","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"67674","messageId":"alpine.LNX.1.00.0802061141320.13593@iabervon.org","threadId":"11919","inReplyTo":null,"subject":"[PATCH 3/4] Retain extra blank lines between the summary and the body","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-02-06T16:43:24Z","receivedAt":"2008-02-06T16:43:24Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"This is so that it's possible to have a message that will generate an\nemail with the first line blank. If the email you're generating is\nactually a template, you may have a single line filling in for a\n~3-line paragraph, meaning that the space starts with a blank line,\nwhich was impossible before as output from the message-splitting code.\n\nSigned-off-by: Daniel Barkalow <barkalow@iabervon.org>\n---\n pretty.c |    4 ----\n 1 files changed, 0 insertions(+), 4 deletions(-)\n\ndiff --git a/pretty.c b/pretty.c\nindex f82380b..98efac2 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -713,7 +713,6 @@ void pp_remainder(enum cmit_fmt fmt,\n \t\t  struct strbuf *sb,\n \t\t  int indent)\n {\n-\tint first = 1;\n \tfor (;;) {\n \t\tconst char *line = *msg_p;\n \t\tint linelen = get_one_line(line);\n@@ -723,12 +722,9 @@ void pp_remainder(enum cmit_fmt fmt,\n \t\t\tbreak;\n \n \t\tif (is_empty_line(line, &linelen)) {\n-\t\t\tif (first)\n-\t\t\t\tcontinue;\n \t\t\tif (fmt == CMIT_FMT_SHORT)\n \t\t\t\tbreak;\n \t\t}\n-\t\tfirst = 0;\n \n \t\tstrbuf_grow(sb, linelen + indent + 20);\n \t\tif (indent) {\n-- \n1.5.4.27.gf6864\n"},{"id":"67705","messageId":"7v4pclx1xu.fsf@gitster.siamese.dyndns.org","threadId":"11919","inReplyTo":"alpine.LNX.1.00.0802061141320.13593@iabervon.org","subject":"Re: [PATCH 3/4] Retain extra blank lines between the summary and the body","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-06T20:30:37Z","receivedAt":"2008-02-06T20:30:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> This is so that it's possible to have a message that will generate an\n> email with the first line blank. If the email you're generating is\n> actually a template, you may have a single line filling in for a\n> ~3-line paragraph, meaning that the space starts with a blank line,\n> which was impossible before as output from the message-splitting code.\n>\n> Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>\n> ---\n>  pretty.c |    4 ----\n>  1 files changed, 0 insertions(+), 4 deletions(-)\n>\n> diff --git a/pretty.c b/pretty.c\n> index f82380b..98efac2 100644\n> --- a/pretty.c\n> +++ b/pretty.c\n> @@ -713,7 +713,6 @@ void pp_remainder(enum cmit_fmt fmt,\n>  \t\t  struct strbuf *sb,\n>  \t\t  int indent)\n>  {\n> -\tint first = 1;\n>  \tfor (;;) {\n>  \t\tconst char *line = *msg_p;\n>  \t\tint linelen = get_one_line(line);\n> @@ -723,12 +722,9 @@ void pp_remainder(enum cmit_fmt fmt,\n>  \t\t\tbreak;\n>  \n>  \t\tif (is_empty_line(line, &linelen)) {\n> -\t\t\tif (first)\n> -\t\t\t\tcontinue;\n>  \t\t\tif (fmt == CMIT_FMT_SHORT)\n>  \t\t\t\tbreak;\n>  \t\t}\n> -\t\tfirst = 0;\n>  \n>  \t\tstrbuf_grow(sb, linelen + indent + 20);\n>  \t\tif (indent) {\n\nI have to wonder if this regresses the normal codepath to\ncleanse commit messages that have extra blanks at the\nbeginning.\n"},{"id":"67719","messageId":"alpine.LNX.1.00.0802061711231.13593@iabervon.org","threadId":"11919","inReplyTo":"7v4pclx1xu.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 3/4] Retain extra blank lines between the summary and the body","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-02-06T22:17:46Z","receivedAt":"2008-02-06T22:17:46Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Wed, 6 Feb 2008, Junio C Hamano wrote:\n\n> Daniel Barkalow <barkalow@iabervon.org> writes:\n> \n> > This is so that it's possible to have a message that will generate an\n> > email with the first line blank. If the email you're generating is\n> > actually a template, you may have a single line filling in for a\n> > ~3-line paragraph, meaning that the space starts with a blank line,\n> > which was impossible before as output from the message-splitting code.\n> >\n> > Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>\n> > ---\n> >  pretty.c |    4 ----\n> >  1 files changed, 0 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/pretty.c b/pretty.c\n> > index f82380b..98efac2 100644\n> > --- a/pretty.c\n> > +++ b/pretty.c\n> > @@ -713,7 +713,6 @@ void pp_remainder(enum cmit_fmt fmt,\n> >  \t\t  struct strbuf *sb,\n> >  \t\t  int indent)\n> >  {\n> > -\tint first = 1;\n> >  \tfor (;;) {\n> >  \t\tconst char *line = *msg_p;\n> >  \t\tint linelen = get_one_line(line);\n> > @@ -723,12 +722,9 @@ void pp_remainder(enum cmit_fmt fmt,\n> >  \t\t\tbreak;\n> >  \n> >  \t\tif (is_empty_line(line, &linelen)) {\n> > -\t\t\tif (first)\n> > -\t\t\t\tcontinue;\n> >  \t\t\tif (fmt == CMIT_FMT_SHORT)\n> >  \t\t\t\tbreak;\n> >  \t\t}\n> > -\t\tfirst = 0;\n> >  \n> >  \t\tstrbuf_grow(sb, linelen + indent + 20);\n> >  \t\tif (indent) {\n> \n> I have to wonder if this regresses the normal codepath to\n> cleanse commit messages that have extra blanks at the\n> beginning.\n\nWhen we discussed this ages ago, I think we came to the conclusion that it \ndidn't matter. The code doesn't remove extra blank lines from between body \nparagraphs, so it's a bit arbitrary to remove them between the first line \nand the following paragraph. And people tend not to have commit messages \nwith blank lines there (in fact, I think git strips them out on commit).\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"67770","messageId":"7vsl05nnds.fsf@gitster.siamese.dyndns.org","threadId":"11919","inReplyTo":"alpine.LNX.1.00.0802061711231.13593@iabervon.org","subject":"Re: [PATCH 3/4] Retain extra blank lines between the summary and the body","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-07T09:09:51Z","receivedAt":"2008-02-07T09:09:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> When we discussed this ages ago, I think we came to the conclusion that it \n> didn't matter. The code doesn't remove extra blank lines from between body \n> paragraphs, so it's a bit arbitrary to remove them between the first line \n> and the following paragraph. And people tend not to have commit messages \n> with blank lines there (in fact, I think git strips them out on commit).\n\nAh, then \"Stripping only at the beginning is inconsistent and\nwrong\" would be a better description.  Then that's fine by me in\neither case.\n\nThanks for a reminder.\n"}]}