From 4d128884fbcce6c7effc729e1c52f06ce17037ee Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 11 Feb 2010 16:19:37 -0500 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 ' or 'git rm ' and commit the result with: git commit -c HEAD~23 Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin-revert.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/builtin-revert.c b/builtin-revert.c index ad612497a..eff52687a 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 ' or 'git rm '\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); } -- 2.26.2