git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cherry-pick -x: add newline before pick note
@ 2010-11-16 15:11 Michael J Gruber
  2010-11-16 19:30 ` Jeff King
  2011-03-08 12:54 ` Oswald Buddenhagen
  0 siblings, 2 replies; 13+ messages in thread
From: Michael J Gruber @ 2010-11-16 15:11 UTC (permalink / raw)
  To: git; +Cc: Martin Svensson

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@netinsight.se>
Signed-off-by: Michael J Gruber <git@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");
 		}
-- 
1.7.3.2.193.g78bbb

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-03-08 22:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-03-08 22:08   ` Jonathan Nieder
2011-03-08 22:18     ` Oswald Buddenhagen
2011-03-08 22:34       ` Jonathan Nieder

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