{"thread":{"id":"37912","subject":"[PATCH v2 0/5] Small \"git interpret-trailers\" fixes","startedAt":"2014-11-09T09:23:38Z","lastAt":"2014-11-10T19:58:49Z","messageCount":9,"participants":["Christian Couder","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":5},"messages":[{"id":"251584","messageId":"20141109092313.4864.54933.chriscool@tuxfamily.org","threadId":"37912","inReplyTo":null,"subject":"[PATCH v2 0/5] Small \"git interpret-trailers\" fixes","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2014-11-09T09:23:38Z","receivedAt":"2014-11-09T09:23:38Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Here is a series to fix a few small bugs in \"git interpret-trailers\".\n\nPatch 1/5 and patch 2/5 are independent from the last 3 patches,\nand can be applied to master.\n\nPatches 3/5, 4/5 and 5/5 depend on this series by Junio:\n\n        jc/conflict-hint (2014-10-28) 4 commits\n          (merged to 'next' on 2014-10-29 at 693250f)\n\nChanges since the previous version are:\n\n* use \"%.*s\" instead of a strbuf, in patch 2/5\n\n* add new find_trailer_end() function and a call to strbuf_release(),\n  in patch 4/5\n\nThanks to Junio and Peff.\n\nChristian Couder (5):\n  trailer: ignore comment lines inside the trailers\n  trailer: display a trailer without its trailing newline\n  commit: make ignore_non_trailer() non static\n  trailer: reuse ignore_non_trailer() to ignore conflict lines\n  trailer: add test with an old style conflict block\n\n builtin/commit.c              | 46 -------------------------------------------\n commit.c                      | 46 +++++++++++++++++++++++++++++++++++++++++++\n commit.h                      |  3 +++\n t/t7513-interpret-trailers.sh | 34 +++++++++++++++++++++++++++++++-\n trailer.c                     | 46 ++++++++++++++++++++++++++++++++-----------\n 5 files changed, 117 insertions(+), 58 deletions(-)\n\n-- \n2.1.2.555.gfbecd99\n"},{"id":"251588","messageId":"20141109092344.4864.68904.chriscool@tuxfamily.org","threadId":"37912","inReplyTo":"20141109092313.4864.54933.chriscool@tuxfamily.org","subject":"[PATCH v2 1/5] trailer: ignore comment lines inside the trailers","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2014-11-09T09:23:39Z","receivedAt":"2014-11-09T09:23:39Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Otherwise trailers that are commented out might be\nprocessed. We would also error out if the comment line\nchar is also a separator.\n\nThis means that comments inside a trailer block will\ndisappear, but that was already the case anyway.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n trailer.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/trailer.c b/trailer.c\nindex 8514566..761b763 100644\n--- a/trailer.c\n+++ b/trailer.c\n@@ -804,8 +804,10 @@ static int process_input_file(struct strbuf **lines,\n \n \t/* Parse trailer lines */\n \tfor (i = trailer_start; i < patch_start; i++) {\n-\t\tstruct trailer_item *new = create_trailer_item(lines[i]->buf);\n-\t\tadd_trailer_item(in_tok_first, in_tok_last, new);\n+\t\tif (lines[i]->buf[0] != comment_line_char) {\n+\t\t\tstruct trailer_item *new = create_trailer_item(lines[i]->buf);\n+\t\t\tadd_trailer_item(in_tok_first, in_tok_last, new);\n+\t\t}\n \t}\n \n \treturn patch_start;\n-- \n2.1.2.555.gfbecd99\n"},{"id":"251587","messageId":"20141109092344.4864.55173.chriscool@tuxfamily.org","threadId":"37912","inReplyTo":"20141109092313.4864.54933.chriscool@tuxfamily.org","subject":"[PATCH v2 2/5] trailer: display a trailer without its trailing newline","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2014-11-09T09:23:40Z","receivedAt":"2014-11-09T09:23:40Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Trailers passed to the parse_trailer() function often have\na trailing newline. When erroring out, we should display\nthe invalid trailer properly, that means without any\ntrailing newline.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nHelped-by: Jeff King <peff@peff.net>\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n trailer.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/trailer.c b/trailer.c\nindex 761b763..219a5a2 100644\n--- a/trailer.c\n+++ b/trailer.c\n@@ -583,8 +583,12 @@ static int parse_trailer(struct strbuf *tok, struct strbuf *val, const char *tra\n \tstrbuf_addch(&seps, '=');\n \tlen = strcspn(trailer, seps.buf);\n \tstrbuf_release(&seps);\n-\tif (len == 0)\n-\t\treturn error(_(\"empty trailer token in trailer '%s'\"), trailer);\n+\tif (len == 0) {\n+\t\tint l = strlen(trailer);\n+\t\twhile (l > 0 && isspace(trailer[l - 1]))\n+\t\t\tl--;\n+\t\treturn error(_(\"empty trailer token in trailer '%.*s'\"), l, trailer);\n+\t}\n \tif (len < strlen(trailer)) {\n \t\tstrbuf_add(tok, trailer, len);\n \t\tstrbuf_trim(tok);\n-- \n2.1.2.555.gfbecd99\n"},{"id":"251589","messageId":"20141109092344.4864.789.chriscool@tuxfamily.org","threadId":"37912","inReplyTo":"20141109092313.4864.54933.chriscool@tuxfamily.org","subject":"[PATCH v2 3/5] commit: make ignore_non_trailer() non static","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2014-11-09T09:23:41Z","receivedAt":"2014-11-09T09:23:41Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n builtin/commit.c | 46 ----------------------------------------------\n commit.c         | 46 ++++++++++++++++++++++++++++++++++++++++++++++\n commit.h         |  3 +++\n 3 files changed, 49 insertions(+), 46 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex e3c60dd..cda74e9 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -677,52 +677,6 @@ static void adjust_comment_line_char(const struct strbuf *sb)\n \tcomment_line_char = *p;\n }\n \n-/*\n- * Inspect sb and determine the true \"end\" of the log message, in\n- * order to find where to put a new Signed-off-by: line.  Ignored are\n- * trailing comment lines and blank lines, and also the traditional\n- * \"Conflicts:\" block that is not commented out, so that we can use\n- * \"git commit -s --amend\" on an existing commit that forgot to remove\n- * it.\n- *\n- * Returns the number of bytes from the tail to ignore, to be fed as\n- * the second parameter to append_signoff().\n- */\n-static int ignore_non_trailer(struct strbuf *sb)\n-{\n-\tint boc = 0;\n-\tint bol = 0;\n-\tint in_old_conflicts_block = 0;\n-\n-\twhile (bol < sb->len) {\n-\t\tchar *next_line;\n-\n-\t\tif (!(next_line = memchr(sb->buf + bol, '\\n', sb->len - bol)))\n-\t\t\tnext_line = sb->buf + sb->len;\n-\t\telse\n-\t\t\tnext_line++;\n-\n-\t\tif (sb->buf[bol] == comment_line_char || sb->buf[bol] == '\\n') {\n-\t\t\t/* is this the first of the run of comments? */\n-\t\t\tif (!boc)\n-\t\t\t\tboc = bol;\n-\t\t\t/* otherwise, it is just continuing */\n-\t\t} else if (starts_with(sb->buf + bol, \"Conflicts:\\n\")) {\n-\t\t\tin_old_conflicts_block = 1;\n-\t\t\tif (!boc)\n-\t\t\t\tboc = bol;\n-\t\t} else if (in_old_conflicts_block && sb->buf[bol] == '\\t') {\n-\t\t\t; /* a pathname in the conflicts block */\n-\t\t} else if (boc) {\n-\t\t\t/* the previous was not trailing comment */\n-\t\t\tboc = 0;\n-\t\t\tin_old_conflicts_block = 0;\n-\t\t}\n-\t\tbol = next_line - sb->buf;\n-\t}\n-\treturn boc ? sb->len - boc : 0;\n-}\n-\n static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\t\t     struct commit *current_head,\n \t\t\t     struct wt_status *s,\ndiff --git a/commit.c b/commit.c\nindex 19cf8f9..a54cb9a 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -1640,3 +1640,49 @@ const char *find_commit_header(const char *msg, const char *key, size_t *out_len\n \t}\n \treturn NULL;\n }\n+\n+/*\n+ * Inspect sb and determine the true \"end\" of the log message, in\n+ * order to find where to put a new Signed-off-by: line.  Ignored are\n+ * trailing comment lines and blank lines, and also the traditional\n+ * \"Conflicts:\" block that is not commented out, so that we can use\n+ * \"git commit -s --amend\" on an existing commit that forgot to remove\n+ * it.\n+ *\n+ * Returns the number of bytes from the tail to ignore, to be fed as\n+ * the second parameter to append_signoff().\n+ */\n+int ignore_non_trailer(struct strbuf *sb)\n+{\n+\tint boc = 0;\n+\tint bol = 0;\n+\tint in_old_conflicts_block = 0;\n+\n+\twhile (bol < sb->len) {\n+\t\tchar *next_line;\n+\n+\t\tif (!(next_line = memchr(sb->buf + bol, '\\n', sb->len - bol)))\n+\t\t\tnext_line = sb->buf + sb->len;\n+\t\telse\n+\t\t\tnext_line++;\n+\n+\t\tif (sb->buf[bol] == comment_line_char || sb->buf[bol] == '\\n') {\n+\t\t\t/* is this the first of the run of comments? */\n+\t\t\tif (!boc)\n+\t\t\t\tboc = bol;\n+\t\t\t/* otherwise, it is just continuing */\n+\t\t} else if (starts_with(sb->buf + bol, \"Conflicts:\\n\")) {\n+\t\t\tin_old_conflicts_block = 1;\n+\t\t\tif (!boc)\n+\t\t\t\tboc = bol;\n+\t\t} else if (in_old_conflicts_block && sb->buf[bol] == '\\t') {\n+\t\t\t; /* a pathname in the conflicts block */\n+\t\t} else if (boc) {\n+\t\t\t/* the previous was not trailing comment */\n+\t\t\tboc = 0;\n+\t\t\tin_old_conflicts_block = 0;\n+\t\t}\n+\t\tbol = next_line - sb->buf;\n+\t}\n+\treturn boc ? sb->len - boc : 0;\n+}\ndiff --git a/commit.h b/commit.h\nindex bc68ccb..cd35ac1 100644\n--- a/commit.h\n+++ b/commit.h\n@@ -337,6 +337,9 @@ extern void free_commit_extra_headers(struct commit_extra_header *extra);\n extern const char *find_commit_header(const char *msg, const char *key,\n \t\t\t\t      size_t *out_len);\n \n+/* Find the end of the log message, the right place for a new trailer. */\n+extern int ignore_non_trailer(struct strbuf *sb);\n+\n typedef void (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra,\n \t\t\t\t void *cb_data);\n \n-- \n2.1.2.555.gfbecd99\n"},{"id":"251585","messageId":"20141109092344.4864.88180.chriscool@tuxfamily.org","threadId":"37912","inReplyTo":"20141109092313.4864.54933.chriscool@tuxfamily.org","subject":"[PATCH v2 4/5] trailer: reuse ignore_non_trailer() to ignore conflict lines","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2014-11-09T09:23:42Z","receivedAt":"2014-11-09T09:23:42Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Make sure we look for trailers before any conflict line\nby reusing the ignore_non_trailer() function.\n\nHelped-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/t7513-interpret-trailers.sh |  2 ++\n trailer.c                     | 32 +++++++++++++++++++++++++-------\n 2 files changed, 27 insertions(+), 7 deletions(-)\n\ndiff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh\nindex 1efb880..fed053a 100755\n--- a/t/t7513-interpret-trailers.sh\n+++ b/t/t7513-interpret-trailers.sh\n@@ -232,6 +232,8 @@ test_expect_success 'with message that has comments' '\n \n \t\tReviewed-by: Johan\n \t\tCc: Peff\n+\t\t# last comment\n+\n \tEOF\n \tcat basic_patch >>expected &&\n \tgit interpret-trailers --trim-empty --trailer \"Cc: Peff\" message_with_comments >actual &&\ndiff --git a/trailer.c b/trailer.c\nindex 219a5a2..30636d2 100644\n--- a/trailer.c\n+++ b/trailer.c\n@@ -2,6 +2,7 @@\n #include \"string-list.h\"\n #include \"run-command.h\"\n #include \"string-list.h\"\n+#include \"commit.h\"\n #include \"trailer.h\"\n /*\n  * Copyright (c) 2013, 2014 Christian Couder <chriscool@tuxfamily.org>\n@@ -769,6 +770,22 @@ static int find_trailer_start(struct strbuf **lines, int count)\n \treturn only_spaces ? count : 0;\n }\n \n+/* Get the index of the end of the trailers */\n+static int find_trailer_end(struct strbuf **lines, int patch_start)\n+{\n+\tstruct strbuf sb = STRBUF_INIT;\n+\tint i, ignore_bytes;\n+\n+\tfor (i = 0; i < patch_start; i++)\n+\t\tstrbuf_addbuf(&sb, lines[i]);\n+\tignore_bytes = ignore_non_trailer(&sb);\n+\tstrbuf_release(&sb);\n+\tfor (i = patch_start - 1; i >= 0 && ignore_bytes > 0; i--)\n+\t\tignore_bytes -= lines[i]->len;\n+\n+\treturn i + 1;\n+}\n+\n static int has_blank_line_before(struct strbuf **lines, int start)\n {\n \tfor (;start >= 0; start--) {\n@@ -791,14 +808,15 @@ static int process_input_file(struct strbuf **lines,\n \t\t\t      struct trailer_item **in_tok_last)\n {\n \tint count = 0;\n-\tint patch_start, trailer_start, i;\n+\tint patch_start, trailer_start, trailer_end, i;\n \n \t/* Get the line count */\n \twhile (lines[count])\n \t\tcount++;\n \n \tpatch_start = find_patch_start(lines, count);\n-\ttrailer_start = find_trailer_start(lines, patch_start);\n+\ttrailer_end = find_trailer_end(lines, patch_start);\n+\ttrailer_start = find_trailer_start(lines, trailer_end);\n \n \t/* Print lines before the trailers as is */\n \tprint_lines(lines, 0, trailer_start);\n@@ -807,14 +825,14 @@ static int process_input_file(struct strbuf **lines,\n \t\tprintf(\"\\n\");\n \n \t/* Parse trailer lines */\n-\tfor (i = trailer_start; i < patch_start; i++) {\n+\tfor (i = trailer_start; i < trailer_end; i++) {\n \t\tif (lines[i]->buf[0] != comment_line_char) {\n \t\t\tstruct trailer_item *new = create_trailer_item(lines[i]->buf);\n \t\t\tadd_trailer_item(in_tok_first, in_tok_last, new);\n \t\t}\n \t}\n \n-\treturn patch_start;\n+\treturn trailer_end;\n }\n \n static void free_all(struct trailer_item **first)\n@@ -831,7 +849,7 @@ void process_trailers(const char *file, int trim_empty, struct string_list *trai\n \tstruct trailer_item *in_tok_last = NULL;\n \tstruct trailer_item *arg_tok_first;\n \tstruct strbuf **lines;\n-\tint patch_start;\n+\tint trailer_end;\n \n \t/* Default config must be setup first */\n \tgit_config(git_trailer_default_config, NULL);\n@@ -840,7 +858,7 @@ void process_trailers(const char *file, int trim_empty, struct string_list *trai\n \tlines = read_input_file(file);\n \n \t/* Print the lines before the trailers */\n-\tpatch_start = process_input_file(lines, &in_tok_first, &in_tok_last);\n+\ttrailer_end = process_input_file(lines, &in_tok_first, &in_tok_last);\n \n \targ_tok_first = process_command_line_args(trailers);\n \n@@ -851,7 +869,7 @@ void process_trailers(const char *file, int trim_empty, struct string_list *trai\n \tfree_all(&in_tok_first);\n \n \t/* Print the lines after the trailers as is */\n-\tprint_lines(lines, patch_start, INT_MAX);\n+\tprint_lines(lines, trailer_end, INT_MAX);\n \n \tstrbuf_list_free(lines);\n }\n-- \n2.1.2.555.gfbecd99\n"},{"id":"251586","messageId":"20141109092344.4864.23949.chriscool@tuxfamily.org","threadId":"37912","inReplyTo":"20141109092313.4864.54933.chriscool@tuxfamily.org","subject":"[PATCH v2 5/5] trailer: add test with an old style conflict block","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2014-11-09T09:23:43Z","receivedAt":"2014-11-09T09:23:43Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/t7513-interpret-trailers.sh | 32 +++++++++++++++++++++++++++++++-\n 1 file changed, 31 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh\nindex fed053a..bd0ab46 100755\n--- a/t/t7513-interpret-trailers.sh\n+++ b/t/t7513-interpret-trailers.sh\n@@ -213,7 +213,7 @@ test_expect_success 'with 2 files arguments' '\n '\n \n test_expect_success 'with message that has comments' '\n-\tcat basic_message >>message_with_comments &&\n+\tcat basic_message >message_with_comments &&\n \tsed -e \"s/ Z\\$/ /\" >>message_with_comments <<-\\EOF &&\n \t\t# comment\n \n@@ -240,6 +240,36 @@ test_expect_success 'with message that has comments' '\n \ttest_cmp expected actual\n '\n \n+test_expect_success 'with message that has an old style conflict block' '\n+\tcat basic_message >message_with_comments &&\n+\tsed -e \"s/ Z\\$/ /\" >>message_with_comments <<-\\EOF &&\n+\t\t# comment\n+\n+\t\t# other comment\n+\t\tCc: Z\n+\t\t# yet another comment\n+\t\tReviewed-by: Johan\n+\t\tReviewed-by: Z\n+\t\t# last comment\n+\n+\t\tConflicts:\n+\n+\tEOF\n+\tcat basic_message >expected &&\n+\tcat >>expected <<-\\EOF &&\n+\t\t# comment\n+\n+\t\tReviewed-by: Johan\n+\t\tCc: Peff\n+\t\t# last comment\n+\n+\t\tConflicts:\n+\n+\tEOF\n+\tgit interpret-trailers --trim-empty --trailer \"Cc: Peff\" message_with_comments >actual &&\n+\ttest_cmp expected actual\n+'\n+\n test_expect_success 'with commit complex message and trailer args' '\n \tcat complex_message_body >expected &&\n \tsed -e \"s/ Z\\$/ /\" >>expected <<-\\EOF &&\n-- \n2.1.2.555.gfbecd99\n"},{"id":"251684","messageId":"xmqqbnof9c9d.fsf@gitster.dls.corp.google.com","threadId":"37912","inReplyTo":"20141109092344.4864.88180.chriscool@tuxfamily.org","subject":"Re: [PATCH v2 4/5] trailer: reuse ignore_non_trailer() to ignore conflict lines","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-11-10T17:49:34Z","receivedAt":"2014-11-10T17:49:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> Make sure we look for trailers before any conflict line\n> by reusing the ignore_non_trailer() function.\n>\n> Helped-by: Junio C Hamano <gitster@pobox.com>\n> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n> ---\n\nIt makes sense to unify the logic to decide where the trailer block\nis, I would think.  I however don't think I helped this change in\nany way, not more than \"maintained the codebase as a solid\nfoundation to build new features on\", but at that point it would\napply to any other change and not worth mentioning ;-).\n"},{"id":"251686","messageId":"20141110.200502.1295000903783079007.chriscool@tuxfamily.org","threadId":"37912","inReplyTo":"xmqqbnof9c9d.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v2 4/5] trailer: reuse ignore_non_trailer() to ignore conflict lines","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2014-11-10T19:05:02Z","receivedAt":"2014-11-10T19:05:02Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\nSubject: Re: [PATCH v2 4/5] trailer: reuse ignore_non_trailer() to ignore conflict lines\nDate: Mon, 10 Nov 2014 09:49:34 -0800\n\n> Christian Couder <chriscool@tuxfamily.org> writes:\n> \n>> Make sure we look for trailers before any conflict line\n>> by reusing the ignore_non_trailer() function.\n>>\n>> Helped-by: Junio C Hamano <gitster@pobox.com>\n>> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n>> ---\n> \n> It makes sense to unify the logic to decide where the trailer block\n> is, I would think.  I however don't think I helped this change in\n> any way, not more than \"maintained the codebase as a solid\n> foundation to build new features on\", but at that point it would\n> apply to any other change and not worth mentioning ;-).\n\nDo you want me to resend the series with only the Helped-by removed?\n"},{"id":"251688","messageId":"xmqqy4ri969y.fsf@gitster.dls.corp.google.com","threadId":"37912","inReplyTo":"20141110.200502.1295000903783079007.chriscool@tuxfamily.org","subject":"Re: [PATCH v2 4/5] trailer: reuse ignore_non_trailer() to ignore conflict lines","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-11-10T19:58:49Z","receivedAt":"2014-11-10T19:58:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> From: Junio C Hamano <gitster@pobox.com>\n> Subject: Re: [PATCH v2 4/5] trailer: reuse ignore_non_trailer() to ignore conflict lines\n> Date: Mon, 10 Nov 2014 09:49:34 -0800\n>\n>> Christian Couder <chriscool@tuxfamily.org> writes:\n>> \n>>> Make sure we look for trailers before any conflict line\n>>> by reusing the ignore_non_trailer() function.\n>>>\n>>> Helped-by: Junio C Hamano <gitster@pobox.com>\n>>> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n>>> ---\n>> \n>> It makes sense to unify the logic to decide where the trailer block\n>> is, I would think.  I however don't think I helped this change in\n>> any way, not more than \"maintained the codebase as a solid\n>> foundation to build new features on\", but at that point it would\n>> apply to any other change and not worth mentioning ;-).\n>\n> Do you want me to resend the series with only the Helped-by removed?\n\nNah, I've already removed it.  You have better things to spend your\ntime on ;-)\n"}]}