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

Re: [PATCH] Documentation: 'cherry' does not cope well with merges from upstream

From
APAndrew Pimlott <andrew@pimlott.net>
Date
Jul 1, 2010, 21:33 UTC
Message-ID
<1278019489-sup-4929@pimlott.net>
In-Reply-To
<20100701210919.GA4283@burratino>
Excerpts from Jonathan Nieder's message of Thu Jul 01 14:09:19 -0700 2010:
Show 29 quoted lines
> Example:
> 
>  o---o---F---X'---G---U [upstream]
>           \        \
>            X----Y---M---T [topic]
> 
> Suppose the author of the ‘topic’ branch starts from upstream
> commit F and makes a few changes.  One is applied upstream, and
> additionally there is some other useful upstream change, so he
> performs a merge to include the upstream updates into topic.
> The expected output from ‘cherry’ is:
> 
>  + T
>  + Y
>  - X
> 
> Consider the author of a different branch, also called ‘topic’, but
> this one starts from commit G.  Some infrastructure from an existing 
> branch is needed, so first she merges that.  Then she adds her own
> commit.  The expected output from ‘cherry’ is:
> 
>  + T
>  + Y
>  + X
> 
> since none of the new commits have been applied upstream since
> the fork point.
> 
> ‘cherry’ cannot distinguish between these two cases

Thanks for the awesome explanation! (I looked at the code but would not have pulled this understanding.) I would still say the first output is the more reasonable: it's more likely (in my estimate) the wanted result, and in the case where it's not it's at least easily comprehended.

Anyway, the doc patch helps, and I would love git cherry --full.
Andrew
Previous: Jonathan NiederNext: Jonathan Nieder
Message 6 of 13 in “git cherry not marking commits with equivalent upstream”
  1. Andrew PimlottJul 1, 2010
  2. Andrew PimlottJul 1, 2010
  3. Björn SteinbrinkJul 1, 2010
  4. Andrew PimlottJul 1, 2010
  5. Documentation: 'cherry' does not cope well with merges from upstreamJonathan Nieder, Jul 1, 2010
  6. Andrew PimlottJul 1, 2010
  7. Jonathan NiederJul 1, 2010
  8. Junio C HamanoJul 1, 2010
  9. Jonathan NiederJul 2, 2010
  10. Jonathan NiederJul 2, 2010
  11. Michael J GruberJul 2, 2010
  12. Jonathan NiederJul 2, 2010
  13. Michael J GruberJul 2, 2010

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.