git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] commit: correct advice about aborting a cherry-pick
Date: Fri, 26 Jul 2013 15:16:31 -0400	[thread overview]
Message-ID: <20130726191631.GD29799@sigill.intra.peff.net> (raw)
In-Reply-To: <1374862320-22637-1-git-send-email-artagnon@gmail.com>

On Fri, Jul 26, 2013 at 11:42:00PM +0530, Ramkumar Ramachandra wrote:

> 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

Hmm. I don't think I've run across this message myself, so perhaps I do
not understand the situation. But it seems like you would want to do one
of:

  1. Make an empty commit.

  2. Skip this commit and continue the rest of the cherry-pick sequence.

  3. Abort the cherry pick sequence.

Those are the options presented when rebase runs into an empty commit,
where (2) is presented as "rebase --skip". I'm not sure how to do that
here; is it just "cherry-pick --continue"?

>  I'd also really like to squelch this with an advice.* variable; any
>  suggestions?

This seems like a good candidate for squelching, but you would probably
want to split it. The two parts of the message are:

  1. What happened (the cherry-pick is empty).

  2. How to proceed from here (allow-empty, abort, etc).

You still want to say (1), but (2) is useless to old-timers.  Probably
something like advice.cherryPickInstructions would be a good name for an
option to squelch (2), and it should apply wherever we tell the user how
to proceed. Potentially it should even be advice.sequenceInstructions,
and apply to rebase and am as well.

-Peff

  reply	other threads:[~2013-07-26 19:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26 18:12 [PATCH] commit: correct advice about aborting a cherry-pick Ramkumar Ramachandra
2013-07-26 19:16 ` Jeff King [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130726191631.GD29799@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).