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
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2010, 23:52 UTC
Message-ID
<7vbpaq3glt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100701210919.GA4283@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 20 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.

Sorry, but it is unclear to me what kind of history you have in mind at this point. What "existing branch" are you talking about? Presumably it is not the [topic] in an earlier example, nor it is [upstream] right?

o---o---o---o----G-------.---U [upstream]
                  \       \ 
                   X---Y---M---T
Something like this?
Show 11 quoted lines
> 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, in part because
> it does not distinguish between parents in a merge commit.

Now you completely lost me. I guess the biggest reason is you only talk about "the expected output" without talking about "what it actually gives". Hence it is unclear what the significant difference "between these two cases" you are trying to stress here.

> Thoughts?  Improvements?

I think the actual patch text has the same problem. You say "these commits" without saying which ones they are; perhaps saing "the commits represented by asterisks in the picture" or something may help, but I dunno.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 8 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.