blob: 6c370e1bef9a83cd756146f6a3739abb4d08b4ed [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 ]
25 <commit>... [ \-- <paths>... ]
Junio C Hamano1a4e8412005-12-27 08:17:2326
27DESCRIPTION
28-----------
29Lists commit objects in reverse chronological order starting at the
30given commit(s), taking ancestry relationship into account. This is
31useful to produce human-readable log output.
32
33Commits which are stated with a preceding '{caret}' cause listing to stop at
34that point. Their parents are implied. "git-rev-list foo bar {caret}baz" thus
35means "list all the commits which are included in 'foo' and 'bar', but
36not in 'baz'".
37
38A special notation <commit1>..<commit2> can be used as a
39short-hand for {caret}<commit1> <commit2>.
40
Junio C Hamano872c5682006-07-07 06:05:4041Another special notation is <commit1>...<commit2> which is useful for
42merges. The resulting set of commits is the symmetric difference
43between the two operands. The following two commands are equivalent:
44
45------------
46$ git-rev-list A B --not $(git-merge-base --all A B)
47$ git-rev-list A...B
48------------
Junio C Hamano1a4e8412005-12-27 08:17:2349
50OPTIONS
51-------
52--pretty::
53Print the contents of the commit changesets in human-readable form.
54
55--header::
56Print the contents of the commit in raw-format; each
57record is separated with a NUL character.
58
59--objects::
60Print the object IDs of any object referenced by the listed commits.
61'git-rev-list --objects foo ^bar' thus means "send me all object IDs
62which I need to download if I have the commit object 'bar', but
63not 'foo'".
64
Junio C Hamano5f327762006-03-02 09:14:5165--objects-edge::
66Similar to `--objects`, but also print the IDs of
67excluded commits refixed with a `-` character. This is
68used by `git-pack-objects` to build 'thin' pack, which
69records objects in deltified form based on objects
70contained in these excluded commits to reduce network
71traffic.
72
Junio C Hamano1a4e8412005-12-27 08:17:2373--unpacked::
74Only useful with `--objects`; print the object IDs that
75are not in packs.
76
77--bisect::
78Limit output to the one commit object which is roughly halfway
79between the included and excluded commits. Thus, if 'git-rev-list
Junio C Hamanob0ec2db2006-05-09 00:32:3280--bisect foo {caret}bar {caret}baz' outputs 'midpoint', the output
81of 'git-rev-list foo {caret}midpoint' and 'git-rev-list midpoint
82{caret}bar {caret}baz' would be of roughly the same length.
83Finding the change
Junio C Hamano1a4e8412005-12-27 08:17:2384which introduces a regression is thus reduced to a binary search:
85repeatedly generate and test new 'midpoint's until the commit chain
86is of length one.
87
88--max-count::
89Limit the number of commits output.
90
91--max-age=timestamp, --min-age=timestamp::
92Limit the commits output to specified time range.
93
94--sparse::
95When optional paths are given, the command outputs only
96the commits that changes at least one of them, and also
97ignores merges that do not touch the given paths. This
98flag makes the command output all eligible commits
99(still subject to count and age limitation), but apply
100merge simplification nevertheless.
101
Junio C Hamano9be18972006-01-28 08:54:57102--remove-empty::
103Stop when a given path disappears from the tree.
104
Junio C Hamano872c5682006-07-07 06:05:40105--not::
106Reverses the meaning of the '{caret}' prefix (or lack
107thereof) for all following revision specifiers, up to
108the next `--not`.
109
Junio C Hamano1a4e8412005-12-27 08:17:23110--all::
111Pretend as if all the refs in `$GIT_DIR/refs/` are
112listed on the command line as <commit>.
113
114--topo-order::
115By default, the commits are shown in reverse
116chronological order. This option makes them appear in
117topological order (i.e. descendant commits are shown
118before their parents).
119
Junio C Hamano1a4e8412005-12-27 08:17:23120Author
121------
122Written by Linus Torvalds <torvalds@osdl.org>
123
Junio C Hamano1a4e8412005-12-27 08:17:23124Documentation
125--------------
126Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
127
128GIT
129---
130Part of the gitlink:git[7] suite
131