Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented May 10, 2019

common ancestor with main branch.

Issue detected and fixed by consulting git-revisions manual page
(used git version is 2.21.0):
... - Include commits that are reachable from either or
but exclude those that are reachable from both...
.. - Include commits that are reachable from
but exclude those that are reachable from ...

common ancestor with main branch.

Issue detected and fixed by consulting git-revisions manual page
(used git version is 2.21.0):
 <rev1>...<rev2> - Include commits that are reachable from either <rev1> or <rev2>
 but exclude those that are reachable from both...
 <rev1>..<rev2> - Include commits that are reachable from <rev2>
 but exclude those that are reachable from <rev1>...
@ben
Copy link
Member

ben commented May 11, 2019

From https://git-scm.com/docs/git-rev-parse#_dotted_range_notations:

The .. (two-dot) Range Notation

The ^r1 r2 set operation appears so often that there is a shorthand for it. When you have two commits r1 and r2 (named according to the syntax explained in SPECIFYING REVISIONS above), you can ask for commits that are reachable from r2 excluding those that are reachable from r1 by ^r1 r2 and it can be written as r1..r2.

The …​ (three-dot) Symmetric Difference Notation

A similar notation r1...r2 is called symmetric difference of r1 and r2 and is defined as r1 r2 --not $(git merge-base --all r1 r2). It is the set of commits that are reachable from either one of r1 (left side) or r2 (right side) but not from both.

You're completely right! I can't believe we've been giving the wrong advice this whole time. Thanks!

@ben
Copy link
Member

ben commented May 11, 2019

Actually wait. Let me think through this. I need to go back and really understand these operators before I merge or reject this.

One thing I do know is that an ellipsis in modern typography is three dots.

@ghost
Copy link
Author

ghost commented May 12, 2019

You are right, I am wrong with using the term 'ellipsis' in my patch. Thanks and, sorry for that. Me will update my pr.

@ben
Copy link
Member

ben commented May 13, 2019

👍

@ben ben merged commit eeef60d into progit:master May 13, 2019
@alfredmyers
Copy link
Contributor

You're completely right! I can't believe we've been giving the wrong advice this whole time. Thanks!

Actually, the text was correct. Please see #1265 .

ben added a commit that referenced this pull request Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants