git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org, Martin Svensson <martin.k.svensson@netinsight.se>
Subject: Re: [PATCH] cherry-pick -x: add newline before pick note
Date: Tue, 16 Nov 2010 14:30:18 -0500	[thread overview]
Message-ID: <20101116193018.GA31036@sigill.intra.peff.net> (raw)
In-Reply-To: <d0318dcd2b52f2e818888003e3dd81c7b713fec6.1289920242.git.git@drmicha.warpmail.net>

On Tue, Nov 16, 2010 at 04:11:17PM +0100, Michael J Gruber wrote:

> Currently, cherry-pick -x sticks the pick note immediately after the
> existing commit message. This
> 
> * is bad for commits with 1 line subject (it makes a 2 line subject)
> * is different from git-svn, e.g., which leaves an empty line before.
> 
> Make cherry-pick always insert an empty line before the pick note.

Hmm. Should this respect pseudo-header blocks at the end? E.g., if I
have:

  message subject

  Message body.

  Signed-off-by: Jeff King <peff@peff.net>

shouldn't it result in:

  message subject

  Message body.

  (cherry picked from commit ...)

  Signed-off-by: Jeff King <peff@peff.net>

?

Even better, I wonder if it should actually be:

  message subject

  Message body.

  Signed-off-by: Jeff King <peff@peff.net>
  Cherry-picked-from: ...

And then you could actually sign off the cherry-pick separately, too, if
you wanted, by adding a line _below_ the cherry-picked-from. I have no
idea if people are trying to grep for "cherry picked from commit...",
which my proposal would break.

Note that none of this is introduced by your patch. The current output
for this case is terribly ugly. But I thought I would mention it, as my
third version means we _do_ want the current behavior in some cases
(i.e., when there is already a pseudo-header block).

-Peff

  reply	other threads:[~2010-11-16 19:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16 15:11 [PATCH] cherry-pick -x: add newline before pick note Michael J Gruber
2010-11-16 19:30 ` Jeff King [this message]
2010-11-16 20:25   ` [PATCH] commit -s: allow "(cherry picked " lines in sign-off section Jonathan Nieder
2010-11-16 20:40     ` Jonathan Nieder
2010-11-16 22:52       ` Junio C Hamano
2010-11-16 23:36         ` Jonathan Nieder
2010-11-17 16:46           ` Junio C Hamano
2010-11-17  6:23         ` Jay Soffian
2010-11-17  6:14   ` [PATCH] cherry-pick -x: add newline before pick note Jay Soffian
2011-03-08 12:54 ` Oswald Buddenhagen
2011-03-08 22:08   ` Jonathan Nieder
2011-03-08 22:18     ` Oswald Buddenhagen
2011-03-08 22:34       ` Jonathan Nieder

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

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

  git send-email \
    --in-reply-to=20101116193018.GA31036@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=martin.k.svensson@netinsight.se \
    /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.
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 NNTP newsgroup(s).