{"thread":{"id":"42653","subject":"[PATCH] Make find_commit_subject() more robust","startedAt":"2016-06-18T13:14:08Z","lastAt":"2016-06-22T20:21:07Z","messageCount":15,"participants":["Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"289576","messageId":"34ef85eb4e2aef0b342ef5d3bce9e468c8339486.1466255489.git.johannes.schindelin@gmx.de","threadId":"42653","inReplyTo":null,"subject":"[PATCH] Make find_commit_subject() more robust","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-18T13:12:17Z","receivedAt":"2016-06-18T13:14:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Just like the pretty printing machinery, we should simply ignore empty\nlines at the beginning of the commit messages.\n\nThis discrepancy was noticed when an early version of the rebase--helper\nproduced commit objects with more than one empty line between the header\nand the commit message.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\nPublished-As: https://github.com/dscho/git/releases/tag/leading-empty-lines-v1\n\n\tAaaaand another patch from the rebase--helper front. I guess I'll\n\tcall it a day with this one.\n\n commit.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/commit.c b/commit.c\nindex 3f4f371..7b00989 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -415,6 +415,8 @@ int find_commit_subject(const char *commit_buffer, const char **subject)\n \t\tp++;\n \tif (*p) {\n \t\tp += 2;\n+\t\twhile (*p == '\\n')\n+\t\t\tp++;\n \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n \t\t\t; /* do nothing */\n \t} else\n-- \n2.9.0.119.gb7b8d21\n\nbase-commit: 05219a1276341e72d8082d76b7f5ed394b7437a4\n"},{"id":"289696","messageId":"xmqqeg7ru00i.fsf@gitster.mtv.corp.google.com","threadId":"42653","inReplyTo":"34ef85eb4e2aef0b342ef5d3bce9e468c8339486.1466255489.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH] Make find_commit_subject() more robust","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-06-20T19:35:09Z","receivedAt":"2016-06-20T19:36:03Z","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> Just like the pretty printing machinery, we should simply ignore empty\n> lines at the beginning of the commit messages.\n>\n> This discrepancy was noticed when an early version of the rebase--helper\n> produced commit objects with more than one empty line between the header\n> and the commit message.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> Published-As: https://github.com/dscho/git/releases/tag/leading-empty-lines-v1\n>\n> \tAaaaand another patch from the rebase--helper front. I guess I'll\n> \tcall it a day with this one.\n\nMakes sense.  This has a trivial textual conflict with cleanup\npatches in flight, I think, but that is not a big problem.  It does\nhint that we might want to find a library function that can replace\na hand-rolled while loop we are adding here, though ;-)\n\nPerhaps cast this new behaviour in stone by adding a test?\n\nThanks.\n\n>  commit.c | 2 ++\n>  1 file changed, 2 insertions(+)\n>\n> diff --git a/commit.c b/commit.c\n> index 3f4f371..7b00989 100644\n> --- a/commit.c\n> +++ b/commit.c\n> @@ -415,6 +415,8 @@ int find_commit_subject(const char *commit_buffer, const char **subject)\n>  \t\tp++;\n>  \tif (*p) {\n>  \t\tp += 2;\n> +\t\twhile (*p == '\\n')\n> +\t\t\tp++;\n>  \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n>  \t\t\t; /* do nothing */\n>  \t} else\n"},{"id":"289763","messageId":"alpine.DEB.2.20.1606211402320.22630@virtualbox","threadId":"42653","inReplyTo":"xmqqeg7ru00i.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] Make find_commit_subject() more robust","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-21T12:03:27Z","receivedAt":"2016-06-21T12:03:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 20 Jun 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > Just like the pretty printing machinery, we should simply ignore empty\n> > lines at the beginning of the commit messages.\n> >\n> > This discrepancy was noticed when an early version of the rebase--helper\n> > produced commit objects with more than one empty line between the header\n> > and the commit message.\n> >\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> > Published-As: https://github.com/dscho/git/releases/tag/leading-empty-lines-v1\n> >\n> > \tAaaaand another patch from the rebase--helper front. I guess I'll\n> > \tcall it a day with this one.\n> \n> Makes sense.  This has a trivial textual conflict with cleanup\n> patches in flight, I think, but that is not a big problem.\n\nI will gladly resend rebased to `next`, if you wish.\n\n> It does hint that we might want to find a library function that can\n> replace a hand-rolled while loop we are adding here, though ;-)\n\nHeh. I cannot help you with that ;-)\n\n> Perhaps cast this new behaviour in stone by adding a test?\n\nWill do.\n\nCiao,\nDscho\n"},{"id":"289766","messageId":"901b24554eb4d0381d74ceb31f7bd08709d5eb25.1466512959.git.johannes.schindelin@gmx.de","threadId":"42653","inReplyTo":"34ef85eb4e2aef0b342ef5d3bce9e468c8339486.1466255489.git.johannes.schindelin@gmx.de","subject":"[PATCH v2] Make find_commit_subject() more robust","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-21T12:43:22Z","receivedAt":"2016-06-21T12:45:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Just like the pretty printing machinery, we should simply ignore empty\nlines at the beginning of the commit messages.\n\nThis discrepancy was noticed when an early version of the rebase--helper\nproduced commit objects with more than one empty line between the header\nand the commit message.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\nPublished-As: https://github.com/dscho/git/releases/tag/leading-empty-lines-v2\n\n\tgit blame seemed to be the most accessible user of\n\tfind_commit_subject()...\n\n commit.c                 |  2 ++\n t/t8008-blame-formats.sh | 17 +++++++++++++++++\n 2 files changed, 19 insertions(+)\nInterdiff vs v1:\n\n diff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh\n index 29f84a6..03bd313 100755\n --- a/t/t8008-blame-formats.sh\n +++ b/t/t8008-blame-formats.sh\n @@ -87,4 +87,21 @@ test_expect_success 'blame --line-porcelain output' '\n  \ttest_cmp expect actual\n  '\n  \n +test_expect_success '--porcelain detects first non-empty line as subject' '\n +\t(\n +\t\tGIT_INDEX_FILE=.git/tmp-index &&\n +\t\texport GIT_INDEX_FILE &&\n +\t\techo \"This is it\" >single-file &&\n +\t\tgit add single-file &&\n +\t\ttree=$(git write-tree) &&\n +\t\tcommit=$(printf \"%s\\n%s\\n%s\\n\\n\\noneline\\n\\nbody\\n\" \\\n +\t\t\t\"tree $tree\" \\\n +\t\t\t\"author A <a@b.c> 123456789 +0000\" \\\n +\t\t\t\"committer C <c@d.e> 123456789 +0000\" |\n +\t\tgit hash-object -w -t commit --stdin) &&\n +\t\tgit blame --porcelain $commit -- single-file >output &&\n +\t\tgrep \"^summary oneline$\" output\n +\t)\n +'\n +\n  test_done\n\n\ndiff --git a/commit.c b/commit.c\nindex 3f4f371..7b00989 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -415,6 +415,8 @@ int find_commit_subject(const char *commit_buffer, const char **subject)\n \t\tp++;\n \tif (*p) {\n \t\tp += 2;\n+\t\twhile (*p == '\\n')\n+\t\t\tp++;\n \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n \t\t\t; /* do nothing */\n \t} else\ndiff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh\nindex 29f84a6..03bd313 100755\n--- a/t/t8008-blame-formats.sh\n+++ b/t/t8008-blame-formats.sh\n@@ -87,4 +87,21 @@ test_expect_success 'blame --line-porcelain output' '\n \ttest_cmp expect actual\n '\n \n+test_expect_success '--porcelain detects first non-empty line as subject' '\n+\t(\n+\t\tGIT_INDEX_FILE=.git/tmp-index &&\n+\t\texport GIT_INDEX_FILE &&\n+\t\techo \"This is it\" >single-file &&\n+\t\tgit add single-file &&\n+\t\ttree=$(git write-tree) &&\n+\t\tcommit=$(printf \"%s\\n%s\\n%s\\n\\n\\noneline\\n\\nbody\\n\" \\\n+\t\t\t\"tree $tree\" \\\n+\t\t\t\"author A <a@b.c> 123456789 +0000\" \\\n+\t\t\t\"committer C <c@d.e> 123456789 +0000\" |\n+\t\tgit hash-object -w -t commit --stdin) &&\n+\t\tgit blame --porcelain $commit -- single-file >output &&\n+\t\tgrep \"^summary oneline$\" output\n+\t)\n+'\n+\n test_done\n-- \n2.9.0.118.g0e1a633\n\nbase-commit: ab7797dbe95fff38d9265869ea367020046db118\n"},{"id":"289805","messageId":"xmqq60t2p9fw.fsf@gitster.mtv.corp.google.com","threadId":"42653","inReplyTo":"901b24554eb4d0381d74ceb31f7bd08709d5eb25.1466512959.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v2] Make find_commit_subject() more robust","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-06-21T20:34:59Z","receivedAt":"2016-06-21T20:42:07Z","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> Just like the pretty printing machinery, we should simply ignore empty\n> lines at the beginning of the commit messages.\n\nThanks.\n\n>\n> This discrepancy was noticed when an early version of the rebase--helper\n> produced commit objects with more than one empty line between the header\n> and the commit message.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n> Published-As: https://github.com/dscho/git/releases/tag/leading-empty-lines-v2\n>\n> \tgit blame seemed to be the most accessible user of\n> \tfind_commit_subject()...\n>\n>  commit.c                 |  2 ++\n>  t/t8008-blame-formats.sh | 17 +++++++++++++++++\n>  2 files changed, 19 insertions(+)\n> Interdiff vs v1:\n>\n>  diff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh\n>  index 29f84a6..03bd313 100755\n>  --- a/t/t8008-blame-formats.sh\n>  +++ b/t/t8008-blame-formats.sh\n>  @@ -87,4 +87,21 @@ test_expect_success 'blame --line-porcelain output' '\n>   \ttest_cmp expect actual\n>   '\n>   \n>  +test_expect_success '--porcelain detects first non-empty line as subject' '\n>  +\t(\n>  +\t\tGIT_INDEX_FILE=.git/tmp-index &&\n>  +\t\texport GIT_INDEX_FILE &&\n>  +\t\techo \"This is it\" >single-file &&\n>  +\t\tgit add single-file &&\n>  +\t\ttree=$(git write-tree) &&\n>  +\t\tcommit=$(printf \"%s\\n%s\\n%s\\n\\n\\noneline\\n\\nbody\\n\" \\\n>  +\t\t\t\"tree $tree\" \\\n>  +\t\t\t\"author A <a@b.c> 123456789 +0000\" \\\n>  +\t\t\t\"committer C <c@d.e> 123456789 +0000\" |\n>  +\t\tgit hash-object -w -t commit --stdin) &&\n>  +\t\tgit blame --porcelain $commit -- single-file >output &&\n>  +\t\tgrep \"^summary oneline$\" output\n>  +\t)\n>  +'\n>  +\n>   test_done\n>\n>\n> diff --git a/commit.c b/commit.c\n> index 3f4f371..7b00989 100644\n> --- a/commit.c\n> +++ b/commit.c\n> @@ -415,6 +415,8 @@ int find_commit_subject(const char *commit_buffer, const char **subject)\n>  \t\tp++;\n>  \tif (*p) {\n>  \t\tp += 2;\n> +\t\twhile (*p == '\\n')\n> +\t\t\tp++;\n>  \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n>  \t\t\t; /* do nothing */\n>  \t} else\n> diff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh\n> index 29f84a6..03bd313 100755\n> --- a/t/t8008-blame-formats.sh\n> +++ b/t/t8008-blame-formats.sh\n> @@ -87,4 +87,21 @@ test_expect_success 'blame --line-porcelain output' '\n>  \ttest_cmp expect actual\n>  '\n>  \n> +test_expect_success '--porcelain detects first non-empty line as subject' '\n> +\t(\n> +\t\tGIT_INDEX_FILE=.git/tmp-index &&\n> +\t\texport GIT_INDEX_FILE &&\n> +\t\techo \"This is it\" >single-file &&\n> +\t\tgit add single-file &&\n> +\t\ttree=$(git write-tree) &&\n> +\t\tcommit=$(printf \"%s\\n%s\\n%s\\n\\n\\noneline\\n\\nbody\\n\" \\\n> +\t\t\t\"tree $tree\" \\\n> +\t\t\t\"author A <a@b.c> 123456789 +0000\" \\\n> +\t\t\t\"committer C <c@d.e> 123456789 +0000\" |\n> +\t\tgit hash-object -w -t commit --stdin) &&\n> +\t\tgit blame --porcelain $commit -- single-file >output &&\n> +\t\tgrep \"^summary oneline$\" output\n> +\t)\n> +'\n> +\n>  test_done\n"},{"id":"289812","messageId":"xmqqziqent0e.fsf@gitster.mtv.corp.google.com","threadId":"42653","inReplyTo":"alpine.DEB.2.20.1606211402320.22630@virtualbox","subject":"Re: [PATCH] Make find_commit_subject() more robust","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-06-21T21:15:13Z","receivedAt":"2016-06-21T21:15:27Z","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> Hi Junio,\n>\n> On Mon, 20 Jun 2016, Junio C Hamano wrote:\n>\n>> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n>> \n>> > Just like the pretty printing machinery, we should simply ignore empty\n>> > lines at the beginning of the commit messages.\n>> >\n>> > This discrepancy was noticed when an early version of the rebase--helper\n>> > produced commit objects with more than one empty line between the header\n>> > and the commit message.\n>> >\n>> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> > ---\n>> > Published-As: https://github.com/dscho/git/releases/tag/leading-empty-lines-v1\n>> >\n>> > \tAaaaand another patch from the rebase--helper front. I guess I'll\n>> > \tcall it a day with this one.\n>> \n>> Makes sense.  This has a trivial textual conflict with cleanup\n>> patches in flight, I think, but that is not a big problem.\n>\n> I will gladly resend rebased to `next`, if you wish.\n\nNo, I'd prefer a patch that applies to 'master' for a new feature;\nthere is no need to deliberately get taken hostage by other topics.\n\n>> It does hint that we might want to find a library function that can\n>> replace a hand-rolled while loop we are adding here, though ;-)\n>\n> Heh. I cannot help you with that ;-)\n\nThe reason it hints such a thing is because the line nearby that\ndoes this:\n\n  \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n  \t\t\t; /* do nothing */\n\ngets rewritten to\n\n\t\teol = strchrnul(p, '\\n');\n\ni.e. \"give me the pointer to the first byte that is '\\n', or EOS\".\n\nYour patch introduces a similar loop with similar (but different)\npurpose:\n\n\t\twhile (*p == '\\n')\n\t\t\tp++;\n\nwhich would have been helped if there were a helper with an\nopposite function, i.e.\n\n\t\tp = strcchrnul(p, '\\n');\n\ni.e. \"give me the pointer to the first byte that is not '\\n', or EOS\".\n\nBut there is no such thing.  Although p += strcspn(p, \"\\n\") is a\npossibility, that somehow feels a bit odd.  And that is why I did\nnot hint any existing function and said \"might want to find\".\n\nHOWEVER.\n\nStepping back a bit, I think what we actually want is\n\n\t\tp = skip_blank_lines(p);\n\nthat skips any and all blank lines, including an empty line that\nconsists of all whitespace.\n\nFor example\n\n\t(\n\t\t# grab the header lines\n\t\tgit cat-file commit HEAD | sed -e '/^$/q'\n                # throw in random blank lines\n\t\techo\n                echo \" \"\n                echo \"  \"\n                echo \"   \"\n                echo\n                echo \"Title line\"\n\t) | git hash-object -w -t commit --stdin\n\nwould mint a commit object that has many blank lines in the front,\nsome have whitespace and are not empty.  If you give it to\n\n\tgit show -s | cat -e\n        git show -s --oneline | cat -e\n\nI think you would see what I mean.\n"},{"id":"289834","messageId":"alpine.DEB.2.20.1606221041320.10382@virtualbox","threadId":"42653","inReplyTo":"xmqqziqent0e.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] Make find_commit_subject() more robust","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-22T09:03:51Z","receivedAt":"2016-06-22T09:12:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 21 Jun 2016, Junio C Hamano wrote:\n\n> Your patch introduces a similar loop with similar (but different)\n> purpose:\n> \n> \t\twhile (*p == '\\n')\n> \t\t\tp++;\n> \n> which would have been helped if there were a helper with an\n> opposite function, i.e.\n> \n> \t\tp = strcchrnul(p, '\\n');\n> \n> i.e. \"give me the pointer to the first byte that is not '\\n', or EOS\".\n> \n> But there is no such thing.  Although p += strcspn(p, \"\\n\") is a\n> possibility, that somehow feels a bit odd.  And that is why I did\n> not hint any existing function and said \"might want to find\".\n\nSure. And strcspn() is less efficient than the loop if you already know\nthat the second parameter contains only a single character.\n\n> HOWEVER.\n> \n> Stepping back a bit, I think what we actually want is\n> \n> \t\tp = skip_blank_lines(p);\n> \n> that skips any and all blank lines, including an empty line that\n> consists of all whitespace.\n\nMy original aim was to make find_commit_subject() consistent with the\npretty-printing machinery. I failed to realize that skip_blank_lines()\ndoes more than skipping empty lines, so let me re-roll the patch.\n\nCiao,\nDscho\n"},{"id":"289837","messageId":"cover.1466587806.git.johannes.schindelin@gmx.de","threadId":"42653","inReplyTo":"901b24554eb4d0381d74ceb31f7bd08709d5eb25.1466512959.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 0/2] Make find_commit_subject() consistent with --format=%s","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-22T09:34:19Z","receivedAt":"2016-06-22T09:41:09Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"In an intermediate iteration of my rebase--helper patches, I\naccidentally generated commits with more than one empty line\nbetween the header and the commit message. When using\nfind_commit_subject() to show the oneline, it turned up empty, even\nif the output of `git show --format=%s` looked fine.\n\nTurned out that the pretty-printing machinery helpfully skipped any\nblank lines before the commit message.\n\nIn the first iteration of this patch, I failed to notice that\nthe skip_empty_lines() function used by the pretty printing (which is\ndeclared static, and therefore I originally did not use it in order to\nkeep the patch as minimal as possible) skips also blank lines.\n\nTo make things truly consistent, I now just make the skip_empty_lines()\nfunction public, and then use it.\n\n\nJohannes Schindelin (2):\n  Make the skip_empty_lines() function public\n  Make find_commit_subject() more robust\n\n commit.c                 |  2 +-\n commit.h                 |  1 +\n pretty.c                 |  2 +-\n t/t8008-blame-formats.sh | 17 +++++++++++++++++\n 4 files changed, 20 insertions(+), 2 deletions(-)\n\nPublished-As: https://github.com/dscho/git/releases/tag/leading-empty-lines-v3\nInterdiff vs v2:\n\n diff --git a/commit.c b/commit.c\n index 7b00989..0bf868f 100644\n --- a/commit.c\n +++ b/commit.c\n @@ -414,9 +414,7 @@ int find_commit_subject(const char *commit_buffer, const char **subject)\n  \twhile (*p && (*p != '\\n' || p[1] != '\\n'))\n  \t\tp++;\n  \tif (*p) {\n -\t\tp += 2;\n -\t\twhile (*p == '\\n')\n -\t\t\tp++;\n +\t\tp = skip_empty_lines(p + 2);\n  \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n  \t\t\t; /* do nothing */\n  \t} else\n diff --git a/commit.h b/commit.h\n index b06db4d..fbdd18d 100644\n --- a/commit.h\n +++ b/commit.h\n @@ -177,6 +177,7 @@ extern const char *format_subject(struct strbuf *sb, const char *msg,\n  \t\t\t\t  const char *line_separator);\n  extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);\n  extern int commit_format_is_empty(enum cmit_fmt);\n +extern const char *skip_empty_lines(const char *msg);\n  extern void format_commit_message(const struct commit *commit,\n  \t\t\t\t  const char *format, struct strbuf *sb,\n  \t\t\t\t  const struct pretty_print_context *context);\n diff --git a/pretty.c b/pretty.c\n index c3ec430..1b807b4 100644\n --- a/pretty.c\n +++ b/pretty.c\n @@ -516,7 +516,7 @@ static int is_empty_line(const char *line, int *len_p)\n  \treturn !len;\n  }\n  \n -static const char *skip_empty_lines(const char *msg)\n +const char *skip_empty_lines(const char *msg)\n  {\n  \tfor (;;) {\n  \t\tint linelen = get_one_line(msg);\n diff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh\n index 03bd313..b98f9a4 100755\n --- a/t/t8008-blame-formats.sh\n +++ b/t/t8008-blame-formats.sh\n @@ -94,7 +94,7 @@ test_expect_success '--porcelain detects first non-empty line as subject' '\n  \t\techo \"This is it\" >single-file &&\n  \t\tgit add single-file &&\n  \t\ttree=$(git write-tree) &&\n -\t\tcommit=$(printf \"%s\\n%s\\n%s\\n\\n\\noneline\\n\\nbody\\n\" \\\n +\t\tcommit=$(printf \"%s\\n%s\\n%s\\n\\n\\n  \\noneline\\n\\nbody\\n\" \\\n  \t\t\t\"tree $tree\" \\\n  \t\t\t\"author A <a@b.c> 123456789 +0000\" \\\n  \t\t\t\"committer C <c@d.e> 123456789 +0000\" |\n\n-- \n2.9.0.118.g0e1a633\n\nbase-commit: ab7797dbe95fff38d9265869ea367020046db118\n"},{"id":"289838","messageId":"b6a4fa27a997455c7dc4164f2d0414c99a9bf342.1466587806.git.johannes.schindelin@gmx.de","threadId":"42653","inReplyTo":"cover.1466587806.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 2/2] Make find_commit_subject() more robust","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-22T09:34:27Z","receivedAt":"2016-06-22T09:41:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Just like the pretty printing machinery, we should simply ignore blank\nlines at the beginning of the commit messages.\n\nThis discrepancy was noticed when an early version of the rebase--helper\nproduced commit objects with more than one empty line between the header\nand the commit message.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n commit.c                 |  2 +-\n t/t8008-blame-formats.sh | 17 +++++++++++++++++\n 2 files changed, 18 insertions(+), 1 deletion(-)\n\ndiff --git a/commit.c b/commit.c\nindex 3f4f371..0bf868f 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -414,7 +414,7 @@ int find_commit_subject(const char *commit_buffer, const char **subject)\n \twhile (*p && (*p != '\\n' || p[1] != '\\n'))\n \t\tp++;\n \tif (*p) {\n-\t\tp += 2;\n+\t\tp = skip_empty_lines(p + 2);\n \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n \t\t\t; /* do nothing */\n \t} else\ndiff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh\nindex 29f84a6..b98f9a4 100755\n--- a/t/t8008-blame-formats.sh\n+++ b/t/t8008-blame-formats.sh\n@@ -87,4 +87,21 @@ test_expect_success 'blame --line-porcelain output' '\n \ttest_cmp expect actual\n '\n \n+test_expect_success '--porcelain detects first non-empty line as subject' '\n+\t(\n+\t\tGIT_INDEX_FILE=.git/tmp-index &&\n+\t\texport GIT_INDEX_FILE &&\n+\t\techo \"This is it\" >single-file &&\n+\t\tgit add single-file &&\n+\t\ttree=$(git write-tree) &&\n+\t\tcommit=$(printf \"%s\\n%s\\n%s\\n\\n\\n  \\noneline\\n\\nbody\\n\" \\\n+\t\t\t\"tree $tree\" \\\n+\t\t\t\"author A <a@b.c> 123456789 +0000\" \\\n+\t\t\t\"committer C <c@d.e> 123456789 +0000\" |\n+\t\tgit hash-object -w -t commit --stdin) &&\n+\t\tgit blame --porcelain $commit -- single-file >output &&\n+\t\tgrep \"^summary oneline$\" output\n+\t)\n+'\n+\n test_done\n-- \n2.9.0.118.g0e1a633\n"},{"id":"289839","messageId":"3f1f8a118900c4f572c5f70d1752eda0a48158d7.1466587806.git.johannes.schindelin@gmx.de","threadId":"42653","inReplyTo":"cover.1466587806.git.johannes.schindelin@gmx.de","subject":"[PATCH v3 1/2] Make the skip_empty_lines() function public","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-22T09:34:24Z","receivedAt":"2016-06-22T09:41:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This function will be used also in the find_commit_subject() function.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n commit.h | 1 +\n pretty.c | 2 +-\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/commit.h b/commit.h\nindex b06db4d..fbdd18d 100644\n--- a/commit.h\n+++ b/commit.h\n@@ -177,6 +177,7 @@ extern const char *format_subject(struct strbuf *sb, const char *msg,\n \t\t\t\t  const char *line_separator);\n extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);\n extern int commit_format_is_empty(enum cmit_fmt);\n+extern const char *skip_empty_lines(const char *msg);\n extern void format_commit_message(const struct commit *commit,\n \t\t\t\t  const char *format, struct strbuf *sb,\n \t\t\t\t  const struct pretty_print_context *context);\ndiff --git a/pretty.c b/pretty.c\nindex c3ec430..1b807b4 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -516,7 +516,7 @@ static int is_empty_line(const char *line, int *len_p)\n \treturn !len;\n }\n \n-static const char *skip_empty_lines(const char *msg)\n+const char *skip_empty_lines(const char *msg)\n {\n \tfor (;;) {\n \t\tint linelen = get_one_line(msg);\n-- \n2.9.0.118.g0e1a633\n\n\n"},{"id":"289873","messageId":"xmqq1t3pnnpq.fsf@gitster.mtv.corp.google.com","threadId":"42653","inReplyTo":"cover.1466587806.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH v3 0/2] Make find_commit_subject() consistent with --format=%s","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-06-22T17:21:53Z","receivedAt":"2016-06-22T17:22:01Z","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> In an intermediate iteration of my rebase--helper patches, I\n> accidentally generated commits with more than one empty line\n> between the header and the commit message. When using\n> find_commit_subject() to show the oneline, it turned up empty, even\n> if the output of `git show --format=%s` looked fine.\n\nMuch easier to read with s/this developer/I/g ;-)\n\n> Turned out that the pretty-printing machinery helpfully skipped any\n> blank lines before the commit message.\n>\n> In the first iteration of this patch, I failed to notice that\n> the skip_empty_lines() function used by the pretty printing (which is\n> declared static, and therefore I originally did not use it in order to\n> keep the patch as minimal as possible) skips also blank lines.\n\nBy the way, I think skip_empty_lines() is misnamed, and I think your\nuse of \"blank lines\" in the previous paragraph indicates that you\nagree ;-) It probably was OK back when it was a file-local static\nhelper in pretty.c, but it becomes a part of the global API with\n1/2, renaming it to skip_blank_lines() may be a good thing to do\nthere at the same time.\n\nI could do the tweaking while queuing if you too think it should\nhappen; that way we'd save one roundtrip ;-).\n\n> To make things truly consistent, I now just make the skip_empty_lines()\n> function public, and then use it.\n\nThanks.  Interdiff looks sensible.\n"},{"id":"289899","messageId":"293bdb45f4a7c8b635ec246763346710ff4e3111.1466626795.git.johannes.schindelin@gmx.de","threadId":"42653","inReplyTo":"cover.1466626795.git.johannes.schindelin@gmx.de","subject":"[PATCH v4 1/2] Make the skip_blank_lines() function public","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-22T20:20:16Z","receivedAt":"2016-06-22T20:20:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"This function will be used also in the find_commit_subject() function.\n\nWhile at it, rename the function to reflect that it skips not only\nempty lines, but any lines consisting of only whitespace, too.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n commit.h |  1 +\n pretty.c | 16 ++++++++--------\n 2 files changed, 9 insertions(+), 8 deletions(-)\n\ndiff --git a/commit.h b/commit.h\nindex b06db4d..5b78f83 100644\n--- a/commit.h\n+++ b/commit.h\n@@ -177,6 +177,7 @@ extern const char *format_subject(struct strbuf *sb, const char *msg,\n \t\t\t\t  const char *line_separator);\n extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);\n extern int commit_format_is_empty(enum cmit_fmt);\n+extern const char *skip_blank_lines(const char *msg);\n extern void format_commit_message(const struct commit *commit,\n \t\t\t\t  const char *format, struct strbuf *sb,\n \t\t\t\t  const struct pretty_print_context *context);\ndiff --git a/pretty.c b/pretty.c\nindex c3ec430..3b6bff7 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -507,7 +507,7 @@ void pp_user_info(struct pretty_print_context *pp,\n \t}\n }\n \n-static int is_empty_line(const char *line, int *len_p)\n+static int is_blank_line(const char *line, int *len_p)\n {\n \tint len = *len_p;\n \twhile (len && isspace(line[len - 1]))\n@@ -516,14 +516,14 @@ static int is_empty_line(const char *line, int *len_p)\n \treturn !len;\n }\n \n-static const char *skip_empty_lines(const char *msg)\n+const char *skip_blank_lines(const char *msg)\n {\n \tfor (;;) {\n \t\tint linelen = get_one_line(msg);\n \t\tint ll = linelen;\n \t\tif (!linelen)\n \t\t\tbreak;\n-\t\tif (!is_empty_line(msg, &ll))\n+\t\tif (!is_blank_line(msg, &ll))\n \t\t\tbreak;\n \t\tmsg += linelen;\n \t}\n@@ -875,7 +875,7 @@ const char *format_subject(struct strbuf *sb, const char *msg,\n \t\tint linelen = get_one_line(line);\n \n \t\tmsg += linelen;\n-\t\tif (!linelen || is_empty_line(line, &linelen))\n+\t\tif (!linelen || is_blank_line(line, &linelen))\n \t\t\tbreak;\n \n \t\tif (!sb)\n@@ -894,11 +894,11 @@ static void parse_commit_message(struct format_commit_context *c)\n \tconst char *msg = c->message + c->message_off;\n \tconst char *start = c->message;\n \n-\tmsg = skip_empty_lines(msg);\n+\tmsg = skip_blank_lines(msg);\n \tc->subject_off = msg - start;\n \n \tmsg = format_subject(NULL, msg, NULL);\n-\tmsg = skip_empty_lines(msg);\n+\tmsg = skip_blank_lines(msg);\n \tc->body_off = msg - start;\n \n \tc->commit_message_parsed = 1;\n@@ -1711,7 +1711,7 @@ void pp_remainder(struct pretty_print_context *pp,\n \t\tif (!linelen)\n \t\t\tbreak;\n \n-\t\tif (is_empty_line(line, &linelen)) {\n+\t\tif (is_blank_line(line, &linelen)) {\n \t\t\tif (first)\n \t\t\t\tcontinue;\n \t\t\tif (pp->fmt == CMIT_FMT_SHORT)\n@@ -1782,7 +1782,7 @@ void pretty_print_commit(struct pretty_print_context *pp,\n \t}\n \n \t/* Skip excess blank lines at the beginning of body, if any... */\n-\tmsg = skip_empty_lines(msg);\n+\tmsg = skip_blank_lines(msg);\n \n \t/* These formats treat the title line specially. */\n \tif (pp->fmt == CMIT_FMT_ONELINE || pp->fmt == CMIT_FMT_EMAIL)\n-- \n2.9.0.118.g0e1a633\n\n\n"},{"id":"289900","messageId":"cover.1466626795.git.johannes.schindelin@gmx.de","threadId":"42653","inReplyTo":"cover.1466587806.git.johannes.schindelin@gmx.de","subject":"[PATCH v4 0/2] Make find_commit_subject() consistent with --format=%s","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-22T20:20:11Z","receivedAt":"2016-06-22T20:20:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"In an intermediate iteration of my rebase--helper patches, I\naccidentally generated commits with more than one empty line\nbetween the header and the commit message. When using\nfind_commit_subject() to show the oneline, it turned up empty, even\nif the output of `git show --format=%s` looked fine.\n\nTurned out that the pretty-printing machinery helpfully skipped any\nblank lines before the commit message.\n\nI simply make pretty.c's skip_empty_lines() public (now appropriately\nnamed skip_blank_lines()) to make things consistent.\n\n\nJohannes Schindelin (2):\n  Make the skip_blank_lines() function public\n  Make find_commit_subject() more robust\n\n commit.c                 |  2 +-\n commit.h                 |  1 +\n pretty.c                 | 16 ++++++++--------\n t/t8008-blame-formats.sh | 17 +++++++++++++++++\n 4 files changed, 27 insertions(+), 9 deletions(-)\n\nPublished-As: https://github.com/dscho/git/releases/tag/leading-empty-lines-v4\nInterdiff vs v3:\n\n diff --git a/commit.c b/commit.c\n index 0bf868f..24d4715 100644\n --- a/commit.c\n +++ b/commit.c\n @@ -414,7 +414,7 @@ int find_commit_subject(const char *commit_buffer, const char **subject)\n  \twhile (*p && (*p != '\\n' || p[1] != '\\n'))\n  \t\tp++;\n  \tif (*p) {\n -\t\tp = skip_empty_lines(p + 2);\n +\t\tp = skip_blank_lines(p + 2);\n  \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n  \t\t\t; /* do nothing */\n  \t} else\n diff --git a/commit.h b/commit.h\n index fbdd18d..5b78f83 100644\n --- a/commit.h\n +++ b/commit.h\n @@ -177,7 +177,7 @@ extern const char *format_subject(struct strbuf *sb, const char *msg,\n  \t\t\t\t  const char *line_separator);\n  extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);\n  extern int commit_format_is_empty(enum cmit_fmt);\n -extern const char *skip_empty_lines(const char *msg);\n +extern const char *skip_blank_lines(const char *msg);\n  extern void format_commit_message(const struct commit *commit,\n  \t\t\t\t  const char *format, struct strbuf *sb,\n  \t\t\t\t  const struct pretty_print_context *context);\n diff --git a/pretty.c b/pretty.c\n index 1b807b4..3b6bff7 100644\n --- a/pretty.c\n +++ b/pretty.c\n @@ -507,7 +507,7 @@ void pp_user_info(struct pretty_print_context *pp,\n  \t}\n  }\n  \n -static int is_empty_line(const char *line, int *len_p)\n +static int is_blank_line(const char *line, int *len_p)\n  {\n  \tint len = *len_p;\n  \twhile (len && isspace(line[len - 1]))\n @@ -516,14 +516,14 @@ static int is_empty_line(const char *line, int *len_p)\n  \treturn !len;\n  }\n  \n -const char *skip_empty_lines(const char *msg)\n +const char *skip_blank_lines(const char *msg)\n  {\n  \tfor (;;) {\n  \t\tint linelen = get_one_line(msg);\n  \t\tint ll = linelen;\n  \t\tif (!linelen)\n  \t\t\tbreak;\n -\t\tif (!is_empty_line(msg, &ll))\n +\t\tif (!is_blank_line(msg, &ll))\n  \t\t\tbreak;\n  \t\tmsg += linelen;\n  \t}\n @@ -875,7 +875,7 @@ const char *format_subject(struct strbuf *sb, const char *msg,\n  \t\tint linelen = get_one_line(line);\n  \n  \t\tmsg += linelen;\n -\t\tif (!linelen || is_empty_line(line, &linelen))\n +\t\tif (!linelen || is_blank_line(line, &linelen))\n  \t\t\tbreak;\n  \n  \t\tif (!sb)\n @@ -894,11 +894,11 @@ static void parse_commit_message(struct format_commit_context *c)\n  \tconst char *msg = c->message + c->message_off;\n  \tconst char *start = c->message;\n  \n -\tmsg = skip_empty_lines(msg);\n +\tmsg = skip_blank_lines(msg);\n  \tc->subject_off = msg - start;\n  \n  \tmsg = format_subject(NULL, msg, NULL);\n -\tmsg = skip_empty_lines(msg);\n +\tmsg = skip_blank_lines(msg);\n  \tc->body_off = msg - start;\n  \n  \tc->commit_message_parsed = 1;\n @@ -1711,7 +1711,7 @@ void pp_remainder(struct pretty_print_context *pp,\n  \t\tif (!linelen)\n  \t\t\tbreak;\n  \n -\t\tif (is_empty_line(line, &linelen)) {\n +\t\tif (is_blank_line(line, &linelen)) {\n  \t\t\tif (first)\n  \t\t\t\tcontinue;\n  \t\t\tif (pp->fmt == CMIT_FMT_SHORT)\n @@ -1782,7 +1782,7 @@ void pretty_print_commit(struct pretty_print_context *pp,\n  \t}\n  \n  \t/* Skip excess blank lines at the beginning of body, if any... */\n -\tmsg = skip_empty_lines(msg);\n +\tmsg = skip_blank_lines(msg);\n  \n  \t/* These formats treat the title line specially. */\n  \tif (pp->fmt == CMIT_FMT_ONELINE || pp->fmt == CMIT_FMT_EMAIL)\n diff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh\n index b98f9a4..92c8e79 100755\n --- a/t/t8008-blame-formats.sh\n +++ b/t/t8008-blame-formats.sh\n @@ -87,7 +87,7 @@ test_expect_success 'blame --line-porcelain output' '\n  \ttest_cmp expect actual\n  '\n  \n -test_expect_success '--porcelain detects first non-empty line as subject' '\n +test_expect_success '--porcelain detects first non-blank line as subject' '\n  \t(\n  \t\tGIT_INDEX_FILE=.git/tmp-index &&\n  \t\texport GIT_INDEX_FILE &&\n\n-- \n2.9.0.118.g0e1a633\n\nbase-commit: ab7797dbe95fff38d9265869ea367020046db118\n"},{"id":"289901","messageId":"40e7a90edbb66b3523e19832e13ee10bc96b0371.1466626795.git.johannes.schindelin@gmx.de","threadId":"42653","inReplyTo":"cover.1466626795.git.johannes.schindelin@gmx.de","subject":"[PATCH v4 2/2] Make find_commit_subject() more robust","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-22T20:20:20Z","receivedAt":"2016-06-22T20:20:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Just like the pretty printing machinery, we should simply ignore blank\nlines at the beginning of the commit messages.\n\nThis discrepancy was noticed when an early version of the rebase--helper\nproduced commit objects with more than one empty line between the header\nand the commit message.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n commit.c                 |  2 +-\n t/t8008-blame-formats.sh | 17 +++++++++++++++++\n 2 files changed, 18 insertions(+), 1 deletion(-)\n\ndiff --git a/commit.c b/commit.c\nindex 3f4f371..24d4715 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -414,7 +414,7 @@ int find_commit_subject(const char *commit_buffer, const char **subject)\n \twhile (*p && (*p != '\\n' || p[1] != '\\n'))\n \t\tp++;\n \tif (*p) {\n-\t\tp += 2;\n+\t\tp = skip_blank_lines(p + 2);\n \t\tfor (eol = p; *eol && *eol != '\\n'; eol++)\n \t\t\t; /* do nothing */\n \t} else\ndiff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh\nindex 29f84a6..92c8e79 100755\n--- a/t/t8008-blame-formats.sh\n+++ b/t/t8008-blame-formats.sh\n@@ -87,4 +87,21 @@ test_expect_success 'blame --line-porcelain output' '\n \ttest_cmp expect actual\n '\n \n+test_expect_success '--porcelain detects first non-blank line as subject' '\n+\t(\n+\t\tGIT_INDEX_FILE=.git/tmp-index &&\n+\t\texport GIT_INDEX_FILE &&\n+\t\techo \"This is it\" >single-file &&\n+\t\tgit add single-file &&\n+\t\ttree=$(git write-tree) &&\n+\t\tcommit=$(printf \"%s\\n%s\\n%s\\n\\n\\n  \\noneline\\n\\nbody\\n\" \\\n+\t\t\t\"tree $tree\" \\\n+\t\t\t\"author A <a@b.c> 123456789 +0000\" \\\n+\t\t\t\"committer C <c@d.e> 123456789 +0000\" |\n+\t\tgit hash-object -w -t commit --stdin) &&\n+\t\tgit blame --porcelain $commit -- single-file >output &&\n+\t\tgrep \"^summary oneline$\" output\n+\t)\n+'\n+\n test_done\n-- \n2.9.0.118.g0e1a633\n"},{"id":"289902","messageId":"alpine.DEB.2.20.1606222220240.10382@virtualbox","threadId":"42653","inReplyTo":"xmqq1t3pnnpq.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v3 0/2] Make find_commit_subject() consistent with --format=%s","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-06-22T20:20:54Z","receivedAt":"2016-06-22T20:21:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 22 Jun 2016, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > In an intermediate iteration of my rebase--helper patches, I\n> > accidentally generated commits with more than one empty line\n> > between the header and the commit message. When using\n> > find_commit_subject() to show the oneline, it turned up empty, even\n> > if the output of `git show --format=%s` looked fine.\n> \n> Much easier to read with s/this developer/I/g ;-)\n\n:-P\n\n> > Turned out that the pretty-printing machinery helpfully skipped any\n> > blank lines before the commit message.\n> >\n> > In the first iteration of this patch, I failed to notice that\n> > the skip_empty_lines() function used by the pretty printing (which is\n> > declared static, and therefore I originally did not use it in order to\n> > keep the patch as minimal as possible) skips also blank lines.\n> \n> By the way, I think skip_empty_lines() is misnamed, and I think your\n> use of \"blank lines\" in the previous paragraph indicates that you\n> agree ;-) It probably was OK back when it was a file-local static\n> helper in pretty.c, but it becomes a part of the global API with\n> 1/2, renaming it to skip_blank_lines() may be a good thing to do\n> there at the same time.\n> \n> I could do the tweaking while queuing if you too think it should\n> happen; that way we'd save one roundtrip ;-).\n\nI just sent another iteration.\n\nCiao,\nDscho\n"}]}