blob: dd9fff16d3067fe939642170258fffc427c77729 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-rev-list(1)
2===============
3
4NAME
5----
6git-rev-list - Lists commit objects in reverse chronological order
7
8
9SYNOPSIS
10--------
Junio C Hamano235a91e2006-01-07 01:13:5811[verse]
Junio C Hamano1a4e8412005-12-27 08:17:2312'git-rev-list' [ \--max-count=number ]
Junio C Hamano235a91e2006-01-07 01:13:5813 [ \--max-age=timestamp ]
14 [ \--min-age=timestamp ]
15 [ \--sparse ]
16 [ \--no-merges ]
Junio C Hamano9be18972006-01-28 08:54:5717 [ \--remove-empty ]
Junio C Hamano872c5682006-07-07 06:05:4018 [ \--not ]
Junio C Hamano235a91e2006-01-07 01:13:5819 [ \--all ]
Junio C Hamanodecf50e2006-03-05 10:51:1420 [ \--topo-order ]
Junio C Hamano235a91e2006-01-07 01:13:5821 [ \--parents ]
Junio C Hamano5f327762006-03-02 09:14:5122 [ [\--objects | \--objects-edge] [ \--unpacked ] ]
Junio C Hamano235a91e2006-01-07 01:13:5823 [ \--pretty | \--header ]
24 [ \--bisect ]
Junio C Hamano859f3b42006-08-04 10:04:3025 [ \--merge ]
Junio C Hamano235a91e2006-01-07 01:13:5826 <commit>... [ \-- <paths>... ]
Junio C Hamano1a4e8412005-12-27 08:17:2327
28DESCRIPTION
29-----------
30Lists commit objects in reverse chronological order starting at the
31given commit(s), taking ancestry relationship into account. This is
32useful to produce human-readable log output.
33
34Commits which are stated with a preceding '{caret}' cause listing to stop at
35that point. Their parents are implied. "git-rev-list foo bar {caret}baz" thus
36means "list all the commits which are included in 'foo' and 'bar', but
37not in 'baz'".
38
39A special notation <commit1>..<commit2> can be used as a
40short-hand for {caret}<commit1> <commit2>.
41
Junio C Hamano872c5682006-07-07 06:05:4042Another special notation is <commit1>...<commit2> which is useful for
43merges. The resulting set of commits is the symmetric difference
44between the two operands. The following two commands are equivalent:
45
46------------
47$ git-rev-list A B --not $(git-merge-base --all A B)
48$ git-rev-list A...B
49------------
Junio C Hamano1a4e8412005-12-27 08:17:2350
51OPTIONS
52-------
53--pretty::
54Print the contents of the commit changesets in human-readable form.
55
56--header::
57Print the contents of the commit in raw-format; each
58record is separated with a NUL character.
59
Junio C Hamano7ccb9fd2006-07-15 01:38:4060--parents::
61Print the parents of the commit.
62
Junio C Hamano1a4e8412005-12-27 08:17:2363--objects::
64Print the object IDs of any object referenced by the listed commits.
65'git-rev-list --objects foo ^bar' thus means "send me all object IDs
66which I need to download if I have the commit object 'bar', but
67not 'foo'".
68
Junio C Hamano5f327762006-03-02 09:14:5169--objects-edge::
70Similar to `--objects`, but also print the IDs of
Junio C Hamano51c2ab02006-07-09 20:38:5471excluded commits prefixed with a `-` character. This is
Junio C Hamano5f327762006-03-02 09:14:5172used by `git-pack-objects` to build 'thin' pack, which
73records objects in deltified form based on objects
74contained in these excluded commits to reduce network
75traffic.
76
Junio C Hamano1a4e8412005-12-27 08:17:2377--unpacked::
78Only useful with `--objects`; print the object IDs that
79are not in packs.
80
81--bisect::
82Limit output to the one commit object which is roughly halfway
83between the included and excluded commits. Thus, if 'git-rev-list
Junio C Hamanob0ec2db2006-05-09 00:32:3284--bisect foo {caret}bar {caret}baz' outputs 'midpoint', the output
85of 'git-rev-list foo {caret}midpoint' and 'git-rev-list midpoint
86{caret}bar {caret}baz' would be of roughly the same length.
87Finding the change
Junio C Hamano1a4e8412005-12-27 08:17:2388which introduces a regression is thus reduced to a binary search:
89repeatedly generate and test new 'midpoint's until the commit chain
90is of length one.
91
92--max-count::
93Limit the number of commits output.
94
95--max-age=timestamp, --min-age=timestamp::
96Limit the commits output to specified time range.
97
98--sparse::
99When optional paths are given, the command outputs only
100the commits that changes at least one of them, and also
101ignores merges that do not touch the given paths. This
102flag makes the command output all eligible commits
103(still subject to count and age limitation), but apply
104merge simplification nevertheless.
105
Junio C Hamano9be18972006-01-28 08:54:57106--remove-empty::
107Stop when a given path disappears from the tree.
108
Junio C Hamano7ccb9fd2006-07-15 01:38:40109--no-merges::
110Do not print commits with more than one parent.
111
Junio C Hamano872c5682006-07-07 06:05:40112--not::
113Reverses the meaning of the '{caret}' prefix (or lack
114thereof) for all following revision specifiers, up to
115the next `--not`.
116
Junio C Hamano1a4e8412005-12-27 08:17:23117--all::
118Pretend as if all the refs in `$GIT_DIR/refs/` are
119listed on the command line as <commit>.
120
121--topo-order::
122By default, the commits are shown in reverse
123chronological order. This option makes them appear in
124topological order (i.e. descendant commits are shown
125before their parents).
126
Junio C Hamano859f3b42006-08-04 10:04:30127--merge::
128After a failed merge, show refs that touch files having a
129conflict and don't exist on all heads to merge.
130
Junio C Hamano1a4e8412005-12-27 08:17:23131Author
132------
133Written by Linus Torvalds <torvalds@osdl.org>
134
Junio C Hamano1a4e8412005-12-27 08:17:23135Documentation
136--------------
137Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
138
139GIT
140---
141Part of the gitlink:git[7] suite
142