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

Re: Thoughts about the -m option of cherry-pick and revert

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Jun 21, 2024, 10:12 UTC
Message-ID
<919b40c6-9497-4646-b7ba-62c2236a4c79@gmail.com>
In-Reply-To
<xmqqa5jfoxvh.fsf@gitster.g>
On 21/06/2024 03:03, Junio C Hamano wrote:
Show 8 quoted lines
> Stefan Haller <lists@haller-berlin.de> writes:
>
> Given that the current behaviour was chosen to make sure that the
> user is aware that the commit being reverted/cherry-picked is a
> merge and has a chance to choose the right parent (as opposed to
> blindly picking the first parent that happened to be the right one
> by accident), I am not sure if it is prudent to change the
> behaviour.

FWIW I agree with this, for me the main benefit of the current behavior is stopping when I'm not expecting to cherry-pick a merge.

Best Wishes
Phillip
Show 9 quoted lines
> If I were simplifying this, I would probably
> 
>   (1) disallow cherry-picking a merge (and suggest redoing the same
>       merge, possibly after rebasing the copy of the merged history
>       to an appropriate base as needed), and
>   (2) allowing reverting a merge only wrt the first parent,
> 
> but that is a different story.
> 
Previous: Junio C Hamano
Message 9 of 9 in “Thoughts about the -m option of cherry-pick and revert”
  1. Stefan HallerJun 20, 2024
  2. Junio C HamanoJun 21, 2024
  3. Stefan HallerJun 21, 2024
  4. Phillip WoodJun 21, 2024
  5. Stefan HallerJun 21, 2024
  6. Junio C HamanoJun 21, 2024
  7. Stefan HallerJun 24, 2024
  8. Junio C HamanoJun 24, 2024
  9. Phillip WoodJun 21, 2024

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.