summaryrefslogtreecommitdiff
path: root/builtin-revert.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2010-02-11 16:19:37 -0500
committerJunio C Hamano <gitster@pobox.com>2010-02-11 22:11:12 -0800
commit4d128884fbcce6c7effc729e1c52f06ce17037ee (patch)
treee2ce135772498dd408a106c20afe625c2680dac6 /builtin-revert.c
parent97915544f84132b210a336d5877fafd7cb104abe (diff)
downloadgit-4d128884fbcce6c7effc729e1c52f06ce17037ee.tar.gz
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@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-revert.c')
-rw-r--r--builtin-revert.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/builtin-revert.c b/builtin-revert.c
index ad612497a2..eff52687a8 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);
}