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

Re: grep open pull requests

From
Jeff King <peff@peff.net>
Date
Jan 19, 2017, 22:24 UTC
Message-ID
<20170119222407.7y55did5hft55s27@sigill.intra.peff.net>
In-Reply-To
<9f59c0d7-73d3-1b4c-65ca-700d6e1f4f23@nottheoilrig.com>
On Thu, Jan 19, 2017 at 03:12:53PM -0700, Jack Bates wrote:
Show 6 quoted lines
> Cool, thanks for all your help! "git log --cherry-pick" works quite well.
> One thing: I expected the following to be equivalent, but found that they're
> not. Is that by accident or design?
> 
>   $ git rev-list --cherry-pick --right-only master...refs/pull/1112/head
>   $ git rev-list --cherry-pick master..refs/pull/1112/head

It's by design. The "left" and "right" notions are defined only for a three-dot symmetric difference.

In the first command you've asked git to look at commits on _both_ master and the PR, down to their merge base. It marks the tips with a "left" and "right" bit, and then those bits propagate down.

In the second command, you've only asked for the PR commits, and there is no left/right bit at all. So --cherry-pick is doing nothing, as it has no "left" commits to compare to.

-Peff
Previous: Jack Bates
Message 4 of 4 in “grep open pull requests”
  1. Jack BatesJan 19, 2017
  2. Jeff KingJan 19, 2017
  3. Jack BatesJan 19, 2017
  4. Jeff KingJan 19, 2017

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.