diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2010-07-14 01:28:15 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-07-16 15:26:03 -0700 |
commit | f29b5e06b3bdbe3c66a01db8ee67e3c87ae55705 (patch) | |
tree | 6ba83b2c52bcf0cedfcf7b52c6f16930f9fdc5bf /builtin | |
parent | revert: don't print "Finished one cherry-pick." if commit failed (diff) | |
download | tgif-f29b5e06b3bdbe3c66a01db8ee67e3c87ae55705.tar.xz |
revert: improve success message by adding abbreviated commit sha1
Instead of saying "Finished one cherry-pick." or "Finished one revert.",
we now say "Finished cherry-pick of commit <abbreviated sha1>." or
"Finished revert of commit <abbreviated sha1>." which is more informative,
especially when cherry-picking or reverting many commits.
In case of failure the message is now "Automatic cherry-pick of commit
<abbreviated sha1> failed." instead of "Automatic cherry-pick failed."
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/revert.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/revert.c b/builtin/revert.c index ec931bdcfc..e261fb2391 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -492,7 +492,8 @@ static int do_pick_commit(void) } } - strbuf_addstr(&mebuf, me); + strbuf_addf(&mebuf, "%s of commit %s", me, + find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV)); if (!strategy || !strcmp(strategy, "recursive") || action == REVERT) { res = do_recursive_merge(base, next, base_label, next_label, @@ -521,7 +522,7 @@ static int do_pick_commit(void) if (!no_commit) res = run_git_commit(defmsg); if (!res) - fprintf(stderr, "Finished one %s.\n", mebuf.buf); + fprintf(stderr, "Finished %s.\n", mebuf.buf); } strbuf_release(&mebuf); |