git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oswald Buddenhagen <ossi@kde.org>
To: git@vger.kernel.org
Subject: Re: [PATCH] cherry-pick -x: add newline before pick note
Date: Tue, 8 Mar 2011 12:54:33 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110308T134920-72@post.gmane.org> (raw)
In-Reply-To: d0318dcd2b52f2e818888003e3dd81c7b713fec6.1289920242.git.git@drmicha.warpmail.net

Michael J Gruber <git <at> drmicha.warpmail.net> writes:
> 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.
> 
> Reported-by: Martin Svensson <martin.k.svensson <at> netinsight.se>
> Signed-off-by: Michael J Gruber <git <at> drmicha.warpmail.net>
> ---
>  builtin/revert.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/builtin/revert.c b/builtin/revert.c
> index 57b51e4..9251257 100644
> --- a/builtin/revert.c
> +++ b/builtin/revert.c
> @@ -485,7 +485,7 @@ static int do_pick_commit(void)
>  		set_author_ident_env(msg.message);
>  		add_message_to_msg(&msgbuf, msg.message);
>  		if (no_replay) {
> -			strbuf_addstr(&msgbuf, "(cherry picked from commit ");
> +			strbuf_addstr(&msgbuf, "\n(cherry picked from commit ");
>  			strbuf_addstr(&msgbuf, sha1_to_hex(commit->object.sha1));
>  			strbuf_addstr(&msgbuf, ")\n");
>  		}

so while everybody is apparently thinking about totally over-engineering
things as much as possible, could we please have this patch applied so we
have a solution for the time being? i really hate to tell my coworkers that
they have to amend the cherry-picks just to make them comply with git's
own guidelines for well-formed commit messages (and thus have them pass
our pre-receive hook).

regards

  parent reply	other threads:[~2011-03-08 13:20 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
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 [this message]
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=loom.20110308T134920-72@post.gmane.org \
    --to=ossi@kde.org \
    --cc=git@vger.kernel.org \
    /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).