Re: [PATCH] sequencer: require trailing NL in footers
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Apr 25, 2017, 21:51 UTC
- Message-ID
- <f49a858b-26da-7e8c-e0f2-8d66158f016a@google.com>
- In-Reply-To
- <CAGZ79kapU5AL_iPJXCavCKAQ0Fw=pqWZS4F6Vri-Q1M1WMVs_w@mail.gmail.com>
On 04/25/2017 02:04 PM, Stefan Beller wrote:
> Thanks for the fix. :) > Do we want to test for this use case in the future?
Thanks!
I'm not sure of the value of including a test for this specific use case, because Git normally does not create commit messages with no trailing newlines. (To test this, I suspect I would need to use hash-object with a specifically crafted commit object.)
Show 17 quoted lines
> >> @@ -151,6 +151,12 @@ static const char *get_todo_path(const struct replay_opts *opts) >> * Returns 1 for conforming footer >> * Returns 2 when sob exists within conforming footer >> * Returns 3 when sob exists within conforming footer as last entry >> + * >> + * A footer that does not end in a newline is considered non-conforming. >> + * >> + * ignore_footer, if not zero, should be the return value of an invocation to >> + * ignore_non_trailer. See the documentation of that function for more >> + * information. >> */ > > Makes sense. Maybe s/ignore_non_trailer/ignore_non_trailer()/ which makes > it easier to recognize it as a function? I'd also drop the last > sentence as it is > implied in the previous sentence (sort of).
OK, I'll add the parentheses if I need to reroll. As for the last sentence, the documentation for ignore_non_trailer is a bit unusual in that it says specifically "to be fed as the second parameter to append_signoff()", so I want to call extra attention to that.