commit: tweak empty cherry pick advice for sequencer
commitc17592a7a2420a61c4c407f4cf635f196f1254f3
authorJeff King <peff@peff.net>
Fri, 26 Jul 2013 23:39:28 +0000 (26 19:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 Jul 2013 15:17:06 +0000 (29 08:17 -0700)
treeeba5489f8c4d642906d00274d5223063928bc414
parent15999998fbda60552742275570947431b57108ae
commit: tweak empty cherry pick advice for sequencer

When we refuse to make an empty commit, we check whether we
are in a cherry-pick in order to give better advice on how
to proceed. We instruct the user to repeat the commit with
"--allow-empty" to force the commit, or to use "git reset"
to skip it and abort the cherry-pick.

In the case of a single cherry-pick, the distinction between
skipping and aborting is not important, as there is no more
work to be done afterwards.  When we are using the sequencer
to cherry pick a series of commits, though, the instruction
is confusing: does it skip this commit, or does it abort the
rest of the cherry-pick?

It does skip, after which the user can continue the
cherry-pick. This is the right thing to be advising the user
to do, but let's make it more clear what will happen, both
by using the word "skip", and by mentioning that the rest of
the sequence can be continued via "cherry-pick --continue"
(whether we skip or take the commit).

Noticed-by: Ramkumar Ramachandra <artagnon@gmail.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c