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