Improve t6029 to check the real "subtree" case
[git/git.git] / Documentation / git-rev-list.txt
CommitLineData
2cf565c5
DG
1git-rev-list(1)
2===============
2cf565c5
DG
3
4NAME
5----
6git-rev-list - Lists commit objects in reverse chronological order
7
8
9SYNOPSIS
10--------
353ce815 11[verse]
69e0c256 12'git-rev-list' [ \--max-count=number ]
d5db6c9e 13 [ \--skip=number ]
353ce815
JF
14 [ \--max-age=timestamp ]
15 [ \--min-age=timestamp ]
16 [ \--sparse ]
17 [ \--no-merges ]
25db465a 18 [ \--first-parent ]
93b74bca 19 [ \--remove-empty ]
29a6c3f8 20 [ \--full-history ]
0d2c9d67 21 [ \--not ]
353ce815 22 [ \--all ]
42cabc34 23 [ \--stdin ]
27350891 24 [ \--quiet ]
765ac8ec 25 [ \--topo-order ]
353ce815 26 [ \--parents ]
e3c1500f 27 [ \--timestamp ]
b24bace5 28 [ \--left-right ]
55a643ed 29 [ \--cherry-pick ]
7cbcf4d5 30 [ \--encoding[=<encoding>] ]
bd95fcd3 31 [ \--(author|committer|grep)=<pattern> ]
e5633cbb
JH
32 [ \--regexp-ignore-case | \-i ]
33 [ \--extended-regexp | \-E ]
dc1c0fff 34 [ \--fixed-strings | \-F ]
1701872f 35 [ \--date={local|relative|default|iso|rfc|short} ]
ec579767 36 [ [\--objects | \--objects-edge] [ \--unpacked ] ]
353ce815
JF
37 [ \--pretty | \--header ]
38 [ \--bisect ]
457f08a0 39 [ \--bisect-vars ]
3ac9f612 40 [ \--bisect-all ]
d249b455 41 [ \--merge ]
9c5e66e9 42 [ \--reverse ]
4d12a471 43 [ \--walk-reflogs ]
8e64006e 44 [ \--no-walk ] [ \--do-walk ]
353ce815 45 <commit>... [ \-- <paths>... ]
2cf565c5
DG
46
47DESCRIPTION
48-----------
8c02eee2 49
2cf565c5 50Lists commit objects in reverse chronological order starting at the
adcd3512 51given commit(s), taking ancestry relationship into account. This is
2cf565c5
DG
52useful to produce human-readable log output.
53
8c02eee2
JF
54Commits which are stated with a preceding '{caret}' cause listing to
55stop at that point. Their parents are implied. Thus the following
56command:
57
58-----------------------------------------------------------------------
59 $ git-rev-list foo bar ^baz
60-----------------------------------------------------------------------
61
adcd3512
MU
62means "list all the commits which are included in 'foo' and 'bar', but
63not in 'baz'".
64
8c02eee2
JF
65A special notation "'<commit1>'..'<commit2>'" can be used as a
66short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of
67the following may be used interchangeably:
69e0c256 68
8c02eee2
JF
69-----------------------------------------------------------------------
70 $ git-rev-list origin..HEAD
71 $ git-rev-list HEAD ^origin
72-----------------------------------------------------------------------
73
74Another special notation is "'<commit1>'...'<commit2>'" which is useful
75for merges. The resulting set of commits is the symmetric difference
0d2c9d67
RS
76between the two operands. The following two commands are equivalent:
77
8c02eee2
JF
78-----------------------------------------------------------------------
79 $ git-rev-list A B --not $(git-merge-base --all A B)
80 $ git-rev-list A...B
81-----------------------------------------------------------------------
82
5162e697 83linkgit:git-rev-list[1] is a very essential git program, since it
8c02eee2
JF
84provides the ability to build and traverse commit ancestry graphs. For
85this reason, it has a lot of different options that enables it to be
5162e697
DM
86used by commands as different as linkgit:git-bisect[1] and
87linkgit:git-repack[1].
69e0c256 88
df8baa42
JF
89OPTIONS
90-------
8c02eee2 91
fdcf39e5
MV
92:git-rev-list: 1
93include::rev-list-options.txt[]
331b51d2
JN
94
95include::pretty-formats.txt[]
96
97
2cf565c5
DG
98Author
99------
100Written by Linus Torvalds <torvalds@osdl.org>
101
102Documentation
103--------------
8c02eee2
JF
104Documentation by David Greaves, Junio C Hamano, Jonas Fonseca
105and the git-list <git@vger.kernel.org>.
2cf565c5
DG
106
107GIT
108---
5162e697 109Part of the linkgit:git[7] suite