git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Vincent Lefevre <vincent@vinc17.net>, git@vger.kernel.org
Subject: Re: git cherry-pick -x: missing blank line before the "cherry picked from commit" line
Date: Fri, 2 Dec 2022 16:41:23 +0000	[thread overview]
Message-ID: <75e00d43-3184-dcf8-4621-cdf02c9f7320@dunelm.org.uk> (raw)
In-Reply-To: <20221202141153.GA5599@cventin.lip.ens-lyon.fr>

Hi Vincent

On 02/12/2022 14:11, Vincent Lefevre wrote:
> With git 2.38.1 under Debian, when I use "git cherry-pick -x"
> on a commit such that the last line of the log message starts
> with "note:" (case insensitively), the blank line before the
> "cherry picked from commit" line is missing.
> 
> For instance:
> 
>      New commit
>      
>      foo
>      
>      nOtE:
>      (cherry picked from commit 3ba643e2eec4bdc1cd46b478ab36ee0707d241c2)

"git cherry-pick -x" takes care not to add a blank line if there are 
trailers such as Signed-off-by: at the end of the message (if it did 
then the trailers would no longer be recognized as trailers as they 
would not be the last paragraph). In this case the "nOtE:" line looks 
like a trailer and so no blank line is added.

I can see it is annoying in this case but I'm afraid I don't have any 
ideas of how we could avoid it without breaking the case where the 
message does contain trailers.

Best Wishes

Phillip

> and
> 
>      New commit
>      
>      Note: foo.
>      (cherry picked from commit d0e85cdd32e30f78eeb968f275fc3a98899d791e)
> 
> but the following ones are OK:
> 
>      New commit
>      
>      note:
>      foo
>      
>      (cherry picked from commit a0ffae22fd3c94210170a3addcf802804f6ee5f7)
> 
> ----
> 
>      New commit
>      
>      A Note:
>      
>      (cherry picked from commit 0a89e0e7f8be3063803b0ad4381cd848ec52dd39)
> 
> ----
> 
>      New commit
>      
>      Note
>      
>      (cherry picked from commit f217bd5069c9d66a8ca54c869919ff484a18d20c)
> 
> ----
> 
> I also had reported the bug in the Debian BTS:
> 
>    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1025155
> 

  reply	other threads:[~2022-12-02 16:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 14:11 git cherry-pick -x: missing blank line before the "cherry picked from commit" line Vincent Lefevre
2022-12-02 16:41 ` Phillip Wood [this message]
2022-12-02 17:01   ` Vincent Lefevre
2022-12-04 15:13     ` Phillip Wood
2022-12-04 15:49       ` Vincent Lefevre
2022-12-05 12:56         ` Christian Couder
2022-12-16  1:15           ` Vincent Lefevre

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=75e00d43-3184-dcf8-4621-cdf02c9f7320@dunelm.org.uk \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=vincent@vinc17.net \
    /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).