[PATCH] commit: correct advice about aborting a cherry-pick
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jul 26, 2013, 18:12 UTC
- Message-ID
- <1374862320-22637-1-git-send-email-artagnon@gmail.com>
When a cherry-pick results in an empty commit, git prints:
The previous cherry-pick is now empty, possibly due to conflict resolution. If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git reset'
The last line is plain wrong in the case of a ranged pick, as a 'git reset' will fail to remove $GIT_DIR/sequencer, failing a subsequent cherry-pick or revert. Change the advice to:
git cherry-pick --abort
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> --- Another candidate for maint?
I'd also really like to squelch this with an advice.* variable; any suggestions?
builtin/commit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/builtin/commit.c b/builtin/commit.c index 003bd7d..1b213f7 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -64,7 +64,10 @@ N_("The previous cherry-pick is now empty, possibly due to conflict resolution.\ "\n" " git commit --allow-empty\n" "\n" -"Otherwise, please use 'git reset'\n"); +"Otherwise, use:\n" +"\n" +" git cherry-pick --abort\n" +"\n"); static const char *use_message_buffer; static const char commit_editmsg[] = "COMMIT_EDITMSG";
-- 1.8.4.rc0.1.g8f6a3e5.dirty