[PATCH] Tidy up some rev-list-related stuff
[git.git] / Documentation / git-rev-list.txt
1 git-rev-list(1)
2 ===============
3 v0.1, May 2005
4
5 NAME
6 ----
7 git-rev-list - Lists commit objects in reverse chronological order
8
9
10 SYNOPSIS
11 --------
12 'git-rev-list' [ *--max-count*=number ] [ *--max-age*=timestamp ] [ *--min-age*=timestamp ] [ *--merge-order* [ *--show-breaks* ] ] <commit>
13
14 DESCRIPTION
15 -----------
16 Lists commit objects in reverse chronological order starting at the
17 given commit, taking ancestry relationship into account.  This is
18 useful to produce human-readable log output.
19
20 If *--merge-order* is specified, the commit history is decomposed into a
21 unique sequence of minimal, non-linear epochs and maximal, linear epochs.
22 Non-linear epochs are then linearised by sorting them into merge order, which
23 is described below.
24
25 Maximal, linear epochs correspond to periods of sequential development.
26 Minimal, non-linear epochs correspond to periods of divergent development
27 followed by a converging merge. The theory of epochs is described in more
28 detail at
29 link:http://blackcubes.dyndns.org/epoch/[http://blackcubes.dyndns.org/epoch/].
30
31 The merge order for a non-linear epoch is defined as a linearisation for which
32 the following invariants are true:
33
34     1. if a commit P is reachable from commit N, commit P sorts after commit N
35        in the linearised list.
36     2. if Pi and Pj are any two parents of a merge M (with i < j), then any
37        commit N, such that N is reachable from Pj but not reachable from Pi,
38        sorts before all commits reachable from Pi.
39
40 Invariant 1 states that later commits appear before earlier commits they are
41 derived from.
42
43 Invariant 2 states that commits unique to "later" parents in a merge, appear
44 before all commits from "earlier" parents of a merge.
45
46 If *--show-breaks* is specified, each item of the list is output with a
47 2-character prefix consisting of one of: (|), (^), (=) followed by a space.
48
49 Commits marked with (=) represent the boundaries of minimal, non-linear epochs
50 and correspond either to the start of a period of divergent development or to
51 the end of such a period.
52
53 Commits marked with (|) are direct parents of commits immediately preceding
54 the marked commit in the list.
55
56 Commits marked with (^) are not parents of the immediately preceding commit.
57 These "breaks" represent necessary discontinuities implied by trying to
58 represent an arbtirary DAG in a linear form.
59
60 *--show-breaks* is only valid if *--merge-order* is also specified.
61
62 Author
63 ------
64 Written by Linus Torvalds <torvalds@osdl.org>
65
66 Original *--merge-order* logic by Jon Seymour <jon.seymour@gmail.com>
67
68 Documentation
69 --------------
70 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
71
72 GIT
73 ---
74 Part of the link:git.html[git] suite
75