Re: git cherry-pick --continue?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 11, 2010 at 04:04:45PM -0500, Jeff King wrote:

> Series to follow:
> 
>   [1/4]: cherry-pick: rewrap advice message
>   [2/4]: cherry-pick: refactor commit parsing code
>   [3/4]: cherry-pick: format help message as strbuf
>   [4/4]: cherry-pick: show commit name instead of sha1

Actually, I think the message is still a bit ugly after this, so perhaps
this 5/4 would help:

-- >8 --
Subject: [PATCH] cherry-pick: prettify the advice message

It's hard to see the "how to commit" part of this message,
which users may want to cut and paste. On top of that,
having it in paragraph form means that a really long commit
name may cause ugly wrapping. Let's make it prettier, like:

  Automatic cherry-pick failed.  After resolving the conflicts,
  mark the corrected paths with 'git add <paths>' or 'git rm <paths>'
  and commit the result with:

          git commit -c HEAD~23

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 builtin-revert.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/builtin-revert.c b/builtin-revert.c
index ad61249..eff5268 100644
--- a/builtin-revert.c
+++ b/builtin-revert.c
@@ -208,14 +208,16 @@ static char *help_msg(const char *name)
 
 	strbuf_addstr(&helpbuf, "  After resolving the conflicts,\n"
 		"mark the corrected paths with 'git add <paths>' or 'git rm <paths>'\n"
-		"and commit the result.");
+		"and commit the result");
 
 	if (action == CHERRY_PICK) {
-		strbuf_addf(&helpbuf,
-			"  When committing, use the option '-c %s'\n"
-			"to retain authorship and message.",
+		strbuf_addf(&helpbuf, " with: \n"
+			"\n"
+			"        git commit -c %s\n",
 			name);
 	}
+	else
+		strbuf_addch(&helpbuf, '.');
 	return strbuf_detach(&helpbuf, NULL);
 }
 
-- 
1.7.0.rc2.32.g190cd.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]