Skip to content

Commit 6be6b17

Browse files
phil-blaingitster
authored andcommitted
git-rev-list.txt: move description to separate file
A following commit will reuse the description of the `git rev-list` command in the `git log` manpage. Move this description to a separate file. Signed-off-by: Philippe Blain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6001a1d commit 6be6b17

File tree

2 files changed

+39
-38
lines changed

2 files changed

+39
-38
lines changed

Documentation/git-rev-list.txt

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,7 @@ SYNOPSIS
1414
DESCRIPTION
1515
-----------
1616

17-
List commits that are reachable by following the `parent` links from the
18-
given commit(s), but exclude commits that are reachable from the one(s)
19-
given with a '{caret}' in front of them. The output is given in reverse
20-
chronological order by default.
21-
22-
You can think of this as a set operation. Commits reachable from any of
23-
the commits given on the command line form a set, and then commits reachable
24-
from any of the ones given with '{caret}' in front are subtracted from that
25-
set. The remaining commits are what comes out in the command's output.
26-
Various other options and paths parameters can be used to further limit the
27-
result.
28-
29-
Thus, the following command:
30-
31-
-----------------------------------------------------------------------
32-
$ git rev-list foo bar ^baz
33-
-----------------------------------------------------------------------
34-
35-
means "list all the commits which are reachable from 'foo' or 'bar', but
36-
not from 'baz'".
37-
38-
A special notation "'<commit1>'..'<commit2>'" can be used as a
39-
short-hand for "^'<commit1>' '<commit2>'". For example, either of
40-
the following may be used interchangeably:
41-
42-
-----------------------------------------------------------------------
43-
$ git rev-list origin..HEAD
44-
$ git rev-list HEAD ^origin
45-
-----------------------------------------------------------------------
46-
47-
Another special notation is "'<commit1>'...'<commit2>'" which is useful
48-
for merges. The resulting set of commits is the symmetric difference
49-
between the two operands. The following two commands are equivalent:
50-
51-
-----------------------------------------------------------------------
52-
$ git rev-list A B --not $(git merge-base --all A B)
53-
$ git rev-list A...B
54-
-----------------------------------------------------------------------
17+
include::rev-list-description.txt[]
5518

5619
'rev-list' is a very essential Git command, since it
5720
provides the ability to build and traverse commit ancestry graphs. For
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
List commits that are reachable by following the `parent` links from the
2+
given commit(s), but exclude commits that are reachable from the one(s)
3+
given with a '{caret}' in front of them. The output is given in reverse
4+
chronological order by default.
5+
6+
You can think of this as a set operation. Commits reachable from any of
7+
the commits given on the command line form a set, and then commits reachable
8+
from any of the ones given with '{caret}' in front are subtracted from that
9+
set. The remaining commits are what comes out in the command's output.
10+
Various other options and paths parameters can be used to further limit the
11+
result.
12+
13+
Thus, the following command:
14+
15+
-----------------------------------------------------------------------
16+
$ git rev-list foo bar ^baz
17+
-----------------------------------------------------------------------
18+
19+
means "list all the commits which are reachable from 'foo' or 'bar', but
20+
not from 'baz'".
21+
22+
A special notation "'<commit1>'..'<commit2>'" can be used as a
23+
short-hand for "^'<commit1>' '<commit2>'". For example, either of
24+
the following may be used interchangeably:
25+
26+
-----------------------------------------------------------------------
27+
$ git rev-list origin..HEAD
28+
$ git rev-list HEAD ^origin
29+
-----------------------------------------------------------------------
30+
31+
Another special notation is "'<commit1>'...'<commit2>'" which is useful
32+
for merges. The resulting set of commits is the symmetric difference
33+
between the two operands. The following two commands are equivalent:
34+
35+
-----------------------------------------------------------------------
36+
$ git rev-list A B --not $(git merge-base --all A B)
37+
$ git rev-list A...B
38+
-----------------------------------------------------------------------

0 commit comments

Comments
 (0)