Thread (4 messages) flat view 4 messages, 2 authors, 2017-01-19

Re: grep open pull requests

From: Jeff King <hidden>
Date: 2017-01-19 22:24:34

On Thu, Jan 19, 2017 at 03:12:53PM -0700, Jack Bates wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help