Add to usage and docs for git-add.sh
[git/git.git] / Documentation / git-rev-list.txt
CommitLineData
2cf565c5
DG
1git-rev-list(1)
2===============
2cf565c5
DG
3
4NAME
5----
6git-rev-list - Lists commit objects in reverse chronological order
7
8
9SYNOPSIS
10--------
adcd3512 11'git-rev-list' [ *--max-count*=number ] [ *--max-age*=timestamp ] [ *--min-age*=timestamp ] [ *--bisect* ] [ *--pretty* ] [ *--objects* ] [ *--merge-order* [ *--show-breaks* ] ] <commit> [ <commit> ...] [ ^<commit> ...]
2cf565c5
DG
12
13DESCRIPTION
14-----------
15Lists commit objects in reverse chronological order starting at the
adcd3512 16given commit(s), taking ancestry relationship into account. This is
2cf565c5
DG
17useful to produce human-readable log output.
18
adcd3512
MU
19Commits which are stated with a preceding '^' cause listing to stop at
20that point. Their parents are implied. "git-rev-list foo bar ^baz" thus
21means "list all the commits which are included in 'foo' and 'bar', but
22not in 'baz'".
23
df8baa42
JF
24OPTIONS
25-------
26--pretty::
27 Print the contents of the commit changesets in human-readable form.
28
29--objects::
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
33 not 'foo'".
34
35--bisect::
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
43 is of length one.
44
45--merge-order::
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.
50+
17ebe977
PB
51Maximal, linear epochs correspond to periods of sequential development.
52Minimal, non-linear epochs correspond to periods of divergent development
53followed by a converging merge. The theory of epochs is described in more
54detail at
55link:http://blackcubes.dyndns.org/epoch/[http://blackcubes.dyndns.org/epoch/].
df8baa42 56+
17ebe977
PB
57The merge order for a non-linear epoch is defined as a linearisation for which
58the following invariants are true:
df8baa42 59+
17ebe977
PB
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.
df8baa42 65+
17ebe977
PB
66Invariant 1 states that later commits appear before earlier commits they are
67derived from.
df8baa42 68+
17ebe977
PB
69Invariant 2 states that commits unique to "later" parents in a merge, appear
70before all commits from "earlier" parents of a merge.
71
df8baa42
JF
72--show-breaks::
73 Each item of the list is output with a 2-character prefix consisting
74 of one of: (|), (^), (=) followed by a space.
75+
17ebe977
PB
76Commits marked with (=) represent the boundaries of minimal, non-linear epochs
77and correspond either to the start of a period of divergent development or to
78the end of such a period.
df8baa42 79+
17ebe977
PB
80Commits marked with (|) are direct parents of commits immediately preceding
81the marked commit in the list.
df8baa42 82+
17ebe977
PB
83Commits marked with (^) are not parents of the immediately preceding commit.
84These "breaks" represent necessary discontinuities implied by trying to
85represent an arbtirary DAG in a linear form.
df8baa42 86+
a3437b8c 87*--show-breaks* is only valid if *--merge-order* is also specified.
2cf565c5
DG
88
89Author
90------
91Written by Linus Torvalds <torvalds@osdl.org>
92
a3437b8c
JS
93Original *--merge-order* logic by Jon Seymour <jon.seymour@gmail.com>
94
2cf565c5
DG
95Documentation
96--------------
97Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
98
99GIT
100---
a7154e91 101Part of the gitlink:git[7] suite
2cf565c5 102