6 git-rev-list - Lists commit objects in reverse chronological order
11 'git-rev-list' [ *--max-count*=number ] [ *--max-age*=timestamp ] [ *--min-age*=timestamp ] [ *--bisect* ] [ *--pretty* ] [ *--objects* ] [ *--merge-order* [ *--show-breaks* ] ] <commit> [ <commit> ...] [ ^<commit> ...]
15 Lists commit objects in reverse chronological order starting at the
16 given commit(s), taking ancestry relationship into account. This is
17 useful to produce human-readable log output.
19 Commits which are stated with a preceding '^' cause listing to stop at
20 that point. Their parents are implied. "git-rev-list foo bar ^baz" thus
21 means "list all the commits which are included in 'foo' and 'bar', but
27 Print the contents of the commit changesets in human-readable form.
30 Print the object IDs of any object referenced by the listed commits.
31 'git-rev-list --objects foo ^bar' thus means "send me all object IDs
32 which I need to download if I have the commit object 'bar', but
36 Limit output to the one commit object which is roughly halfway
37 between the included and excluded commits. Thus, if 'git-rev-list
38 --bisect foo ^bar ^baz' outputs 'midpoint', the output
39 of 'git-rev-list foo ^midpoint' and 'git-rev-list midpoint
40 ^bar ^baz' would be of roughly the same length. Finding the change
41 which introduces a regression is thus reduced to a binary search:
42 repeatedly generate and test new 'midpoint's until the commit chain
46 When specified the commit history is decomposed into a unique
47 sequence of minimal, non-linear epochs and maximal, linear epochs.
48 Non-linear epochs are then linearised by sorting them into merge
49 order, which is described below.
51 Maximal, linear epochs correspond to periods of sequential development.
52 Minimal, non-linear epochs correspond to periods of divergent development
53 followed by a converging merge. The theory of epochs is described in more
55 link:http://blackcubes.dyndns.org/epoch/[http://blackcubes.dyndns.org/epoch/].
57 The merge order for a non-linear epoch is defined as a linearisation for which
58 the following invariants are true:
60 1. if a commit P is reachable from commit N, commit P sorts after commit N
61 in the linearised list.
62 2. if Pi and Pj are any two parents of a merge M (with i < j), then any
63 commit N, such that N is reachable from Pj but not reachable from Pi,
64 sorts before all commits reachable from Pi.
66 Invariant 1 states that later commits appear before earlier commits they are
69 Invariant 2 states that commits unique to "later" parents in a merge, appear
70 before all commits from "earlier" parents of a merge.
73 Each item of the list is output with a 2-character prefix consisting
74 of one of: (|), (^), (=) followed by a space.
76 Commits marked with (=) represent the boundaries of minimal, non-linear epochs
77 and correspond either to the start of a period of divergent development or to
78 the end of such a period.
80 Commits marked with (|) are direct parents of commits immediately preceding
81 the marked commit in the list.
83 Commits marked with (^) are not parents of the immediately preceding commit.
84 These "breaks" represent necessary discontinuities implied by trying to
85 represent an arbtirary DAG in a linear form.
87 *--show-breaks* is only valid if *--merge-order* is also specified.
91 Written by Linus Torvalds <torvalds@osdl.org>
93 Original *--merge-order* logic by Jon Seymour <jon.seymour@gmail.com>
97 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
101 Part of the gitlink:git[7] suite