[ \-\-sparse ]
[ \-\-no\-merges ]
[ \-\-remove\-empty ]
+ [ \-\-not ]
[ \-\-all ]
[ \-\-topo\-order ]
[ \-\-parents ]
A special notation <commit1>\&.\&.<commit2> can be used as a short\-hand for ^<commit1> <commit2>\&.
+
+Another special notation is <commit1>...<commit2> which is useful for merges\&. The resulting set of commits is the symmetric difference between the two operands\&. The following two commands are equivalent:
+
+.nf
+$ git\-rev\-list A B \-\-not $(git\-merge\-base \-\-all A B)
+$ git\-rev\-list A\&.\&.\&.B
+.fi
+
.SH "OPTIONS"
.TP
\-\-remove\-empty
Stop when a given path disappears from the tree\&.
+.TP
+\-\-not
+Reverses the meaning of the \fI^\fR prefix (or lack thereof) for all following revision specifiers, up to the next \-\-not\&.
+
.TP
\-\-all
Pretend as if all the refs in $GIT_DIR/refs/ are listed on the command line as <commit>\&.
.LP
-\fIgit\-rev\-parse\fR also accepts a prefix \fI^\fR to revision parameter, which is passed to \fIgit\-rev\-list\fR\&. Two revision parameters concatenated with \fI\&.\&.\fR is a short\-hand for writing a range between them\&. I\&.e\&. \fIr1\&.\&.r2\fR is equivalent to saying \fI^r1 r2\fR
-
-
Here is an illustration, by Jon Loeliger\&. Both node B and C are a commit parents of commit node A\&. Parent commits are ordered left\-to\-right\&.
.nf
G H I J
\\ / \\ /
D E F
- \\ | /
- \\ | /
- \\|/
+ \\ | / \\ | / |
+ \\|/ |
B C
\\ /
\\ /
J = F^2 = B^3^2 = A^^3^2
.fi
+.SH "SPECIFYING RANGES"
+
+
+History traversing commands such as git\-log operate on a set of commits, not just a single commit\&. To these commands, specifying a single revision with the notation described in the previous section means the set of commits reachable from that commit, following the commit ancestry chain\&.
+
+
+To exclude commits reachable from a commit, a prefix ^ notation is used\&. E\&.g\&. "^r1 r2" means commits reachable from r2 but exclude the ones reachable from r1\&.
+
+
+This set operation appears so often that there is a shorthand for it\&. "r1\&.\&.r2" is equivalent to "^r1 r2"\&. It is the difference of two sets (subtract the set of commits reachable from r1 from the set of commits reachable from r2)\&.
+
+
+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 it the set of commits that are reachable from either one of r1 or r2 but not from both\&.
+
+
+Here are a few examples:
+
+.nf
+D A B D
+D F A B C D F
+^A G B D
+^A F B C F
+G\&.\&.\&.I C D F G I
+^B G I C D F G I
+.fi
+
.SH "AUTHOR"
\-\-topo\-order
By default, the branches and their commits are shown in reverse chronological order\&. This option makes them appear in topological order (i\&.e\&., descendant commits are shown before their parents)\&.
+.TP
+\-\-sparse
+By default, the output omits merges that are reachable from only one tip being shown\&. This option makes them visible\&.
+
.TP
\-\-more=<n>
Usually the command stops output upon showing the commit that is the common ancestor of all the branches\&. This flag tells the command to go <n> more common commits beyond that\&. When <n> is negative, display only the <reference>s given, without showing the commit ancestry tree\&.