git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] commit: correct advice about aborting a cherry-pick

From
Jeff King <peff@peff.net>
Date
Jul 26, 2013, 19:16 UTC
Message-ID
<20130726191631.GD29799@sigill.intra.peff.net>
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:
Show 14 quoted lines
> 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
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 2 of 18 in “commit: correct advice about aborting a cherry-pick”
  1. commit: correct advice about aborting a cherry-pickRamkumar Ramachandra, Jul 26, 2013
  2. Jeff KingJul 26, 2013
  3. Ramkumar RamachandraJul 26, 2013
  4. Jeff KingJul 26, 2013
  5. Ramkumar RamachandraJul 26, 2013
  6. Jonathan NiederJul 26, 2013
  7. Jeff KingJul 26, 2013
  8. Jeff KingJul 26, 2013
  9. Jeff KingJul 26, 2013
  10. Jonathan NiederJul 26, 2013
  11. Jeff KingJul 26, 2013
  12. Jeff KingJul 26, 2013
  13. Ramkumar RamachandraJul 27, 2013
  14. Junio C HamanoJul 29, 2013
  15. Jeff KingJul 29, 2013
  16. Junio C HamanoJul 29, 2013
  17. Junio C HamanoJul 29, 2013
  18. Ramkumar RamachandraJul 27, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.