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