6 git-rev-list - Lists commit objects in reverse chronological order
12 'git-rev-list' [ \--max-count=number ]
13 [ \--max-age=timestamp ]
14 [ \--min-age=timestamp ]
19 [ [ \--merge-order [ \--show-breaks ] ] | [ \--topo-order ] ]
21 [ \--objects [ \--unpacked ] ]
22 [ \--pretty | \--header ]
24 <commit>... [ \-- <paths>... ]
28 Lists commit objects in reverse chronological order starting at the
29 given commit(s), taking ancestry relationship into account. This is
30 useful to produce human-readable log output.
32 Commits which are stated with a preceding '{caret}' cause listing to stop at
33 that point. Their parents are implied. "git-rev-list foo bar {caret}baz" thus
34 means "list all the commits which are included in 'foo' and 'bar', but
37 A special notation <commit1>..<commit2> can be used as a
38 short-hand for {caret}<commit1> <commit2>.
44 Print the contents of the commit changesets in human-readable form.
47 Print the contents of the commit in raw-format; each
48 record is separated with a NUL character.
51 Print the object IDs of any object referenced by the listed commits.
52 'git-rev-list --objects foo ^bar' thus means "send me all object IDs
53 which I need to download if I have the commit object 'bar', but
57 Only useful with `--objects`; print the object IDs that
61 Limit output to the one commit object which is roughly halfway
62 between the included and excluded commits. Thus, if 'git-rev-list
63 --bisect foo ^bar ^baz' outputs 'midpoint', the output
64 of 'git-rev-list foo ^midpoint' and 'git-rev-list midpoint
65 ^bar ^baz' would be of roughly the same length. Finding the change
66 which introduces a regression is thus reduced to a binary search:
67 repeatedly generate and test new 'midpoint's until the commit chain
71 Limit the number of commits output.
73 --max-age=timestamp, --min-age=timestamp::
74 Limit the commits output to specified time range.
77 When optional paths are given, the command outputs only
78 the commits that changes at least one of them, and also
79 ignores merges that do not touch the given paths. This
80 flag makes the command output all eligible commits
81 (still subject to count and age limitation), but apply
82 merge simplification nevertheless.
85 Stop when a given path disappears from the tree.
88 Pretend as if all the refs in `$GIT_DIR/refs/` are
89 listed on the command line as <commit>.
92 By default, the commits are shown in reverse
93 chronological order. This option makes them appear in
94 topological order (i.e. descendant commits are shown
95 before their parents).
98 When specified the commit history is decomposed into a unique
99 sequence of minimal, non-linear epochs and maximal, linear epochs.
100 Non-linear epochs are then linearised by sorting them into merge
101 order, which is described below.
103 Maximal, linear epochs correspond to periods of sequential development.
104 Minimal, non-linear epochs correspond to periods of divergent development
105 followed by a converging merge. The theory of epochs is described in more
107 link:http://blackcubes.dyndns.org/epoch/[http://blackcubes.dyndns.org/epoch/].
109 The merge order for a non-linear epoch is defined as a linearisation for which
110 the following invariants are true:
112 1. if a commit P is reachable from commit N, commit P sorts after commit N
113 in the linearised list.
114 2. if Pi and Pj are any two parents of a merge M (with i < j), then any
115 commit N, such that N is reachable from Pj but not reachable from Pi,
116 sorts before all commits reachable from Pi.
118 Invariant 1 states that later commits appear before earlier commits they are
121 Invariant 2 states that commits unique to "later" parents in a merge, appear
122 before all commits from "earlier" parents of a merge.
125 Each item of the list is output with a 2-character prefix consisting
126 of one of: (|), (^), (=) followed by a space.
128 Commits marked with (=) represent the boundaries of minimal, non-linear epochs
129 and correspond either to the start of a period of divergent development or to
130 the end of such a period.
132 Commits marked with (|) are direct parents of commits immediately preceding
133 the marked commit in the list.
135 Commits marked with (^) are not parents of the immediately preceding commit.
136 These "breaks" represent necessary discontinuities implied by trying to
137 represent an arbitrary DAG in a linear form.
139 `--show-breaks` is only valid if `--merge-order` is also specified.
144 Written by Linus Torvalds <torvalds@osdl.org>
146 Original *--merge-order* logic by Jon Seymour <jon.seymour@gmail.com>
150 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
154 Part of the gitlink:git[7] suite