Skip to content

Commit bd49ffe

Browse files
bedhangergitster
authored andcommitted
Documentation: revisions: add note about 3dots usages as continuation indications
Also, fix typo: "three dot" ---> "three-dot" (align with "two-dot"). Signed-off-by: Ann T Ropea <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 59b3867 commit bd49ffe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Documentation/revisions.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ The '..' (two-dot) Range Notation::
271271
for commits that are reachable from r2 excluding those that are reachable
272272
from r1 by '{caret}r1 r2' and it can be written as 'r1..r2'.
273273

274-
The '...' (three dot) Symmetric Difference Notation::
274+
The '...' (three-dot) Symmetric Difference Notation::
275275
A similar notation 'r1\...r2' is called symmetric difference
276276
of 'r1' and 'r2' and is defined as
277277
'r1 r2 --not $(git merge-base --all r1 r2)'.
@@ -285,6 +285,15 @@ is a shorthand for 'HEAD..origin' and asks "What did the origin do since
285285
I forked from them?" Note that '..' would mean 'HEAD..HEAD' which is an
286286
empty range that is both reachable and unreachable from HEAD.
287287

288+
However, there are instances where '<sha1>...' is *not*
289+
equivalent to '<sha1>...HEAD'. See the "RAW OUTPUT FORMAT"
290+
section of linkgit:git-diff[1]: the three-dot notations used
291+
there are simply continuation indications for the abbreviated
292+
SHA-1 values. The ones encountered there are usually
293+
associated with file/index/tree contents rather than with commit
294+
objects, and the range operators described above are only
295+
applicable to commit objects (i.e., 'r1' and 'r2').
296+
288297
Other <rev>{caret} Parent Shorthand Notations
289298
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290299
Three other shorthands exist, particularly useful for merge commits,

0 commit comments

Comments
 (0)