git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] commit: correct advice about aborting a cherry-pick
@ 2013-07-26 18:12 Ramkumar Ramachandra
  2013-07-26 19:16 ` Jeff King
  0 siblings, 1 reply; 18+ messages in thread
From: Ramkumar Ramachandra @ 2013-07-26 18:12 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-07-29 15:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26 18:12 [PATCH] commit: correct advice about aborting a cherry-pick Ramkumar Ramachandra
2013-07-26 19:16 ` Jeff King
2013-07-26 21:17   ` Ramkumar Ramachandra
2013-07-26 21:24     ` Jeff King
2013-07-26 21:27       ` Ramkumar Ramachandra
2013-07-26 21:37       ` Jonathan Nieder
2013-07-26 21:40         ` Jeff King
2013-07-26 22:43           ` Jeff King
2013-07-26 23:05             ` Jeff King
2013-07-26 23:08               ` Jonathan Nieder
2013-07-26 23:19                 ` Jeff King
2013-07-26 23:39                   ` Jeff King
2013-07-27  8:07                     ` Ramkumar Ramachandra
2013-07-29 15:18                     ` Junio C Hamano
2013-07-29 15:23                       ` Jeff King
2013-07-29 15:48                         ` Junio C Hamano
2013-07-29 15:15             ` Junio C Hamano
2013-07-27  8:19         ` Ramkumar Ramachandra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).