git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: Stefan Beller <sbeller@google.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	Brian Norris <computersforpeace@gmail.com>
Subject: Re: [PATCH] sequencer: require trailing NL in footers
Date: Tue, 25 Apr 2017 14:51:17 -0700	[thread overview]
Message-ID: <f49a858b-26da-7e8c-e0f2-8d66158f016a@google.com> (raw)
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.)

>
>> @@ -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.

  reply	other threads:[~2017-04-25 21:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 22:01 [GIT 2.12.2 REGRESSION] git cherry-pick -x Brian Norris
2017-04-21 22:10 ` Stefan Beller
2017-04-21 22:13   ` Jeff King
2017-04-25 19:06 ` [PATCH] sequencer: require trailing NL in footers Jonathan Tan
2017-04-25 21:04   ` Stefan Beller
2017-04-25 21:51     ` Jonathan Tan [this message]
2017-04-25 21:56       ` Stefan Beller
2017-04-25 22:05         ` Johannes Schindelin
2017-04-25 23:39           ` Jonathan Nieder
2017-04-25 22:30         ` Brian Norris
2017-04-26 20:31           ` Brian Norris
2017-04-25 21:56   ` Johannes Schindelin
2017-04-25 23:34   ` Jonathan Nieder
2017-04-25 23:57   ` [PATCH v2] " Jonathan Tan
2017-04-26  0:07     ` Jonathan Nieder
2017-04-26  2:08       ` Junio C Hamano
2017-04-26  9:09         ` Johannes Schindelin
2017-04-26 20:50   ` [PATCH v3] sequencer: add newline before adding footers Jonathan Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f49a858b-26da-7e8c-e0f2-8d66158f016a@google.com \
    --to=jonathantanmy@google.com \
    --cc=computersforpeace@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).