rev-list --min-parents,--max-parents: doc, test and completion
[git/dscho.git] / Documentation / git-rev-list.txt
blobb2be2029dd7c3012475f34e4ce6b3f9e33e94671
1 git-rev-list(1)
2 ===============
4 NAME
5 ----
6 git-rev-list - Lists commit objects in reverse chronological order
9 SYNOPSIS
10 --------
11 [verse]
12 'git rev-list' [ \--max-count=<number> ]
13              [ \--skip=<number> ]
14              [ \--max-age=<timestamp> ]
15              [ \--min-age=<timestamp> ]
16              [ \--sparse ]
17              [ \--merges ]
18              [ \--no-merges ]
19              [ \--min-parents=<number> ]
20              [ \--no-min-parents ]
21              [ \--max-parents=<number> ]
22              [ \--no-max-parents ]
23              [ \--first-parent ]
24              [ \--remove-empty ]
25              [ \--full-history ]
26              [ \--not ]
27              [ \--all ]
28              [ \--branches[=<pattern>] ]
29              [ \--tags[=<pattern>] ]
30              [ \--remotes[=<pattern>] ]
31              [ \--glob=<glob-pattern> ]
32              [ \--stdin ]
33              [ \--quiet ]
34              [ \--topo-order ]
35              [ \--parents ]
36              [ \--timestamp ]
37              [ \--left-right ]
38              [ \--left-only ]
39              [ \--right-only ]
40              [ \--cherry-mark ]
41              [ \--cherry-pick ]
42              [ \--encoding[=<encoding>] ]
43              [ \--(author|committer|grep)=<pattern> ]
44              [ \--regexp-ignore-case | -i ]
45              [ \--extended-regexp | -E ]
46              [ \--fixed-strings | -F ]
47              [ \--date=(local|relative|default|iso|rfc|short) ]
48              [ [\--objects | \--objects-edge] [ \--unpacked ] ]
49              [ \--pretty | \--header ]
50              [ \--bisect ]
51              [ \--bisect-vars ]
52              [ \--bisect-all ]
53              [ \--merge ]
54              [ \--reverse ]
55              [ \--walk-reflogs ]
56              [ \--no-walk ] [ \--do-walk ]
57              <commit>... [ \-- <paths>... ]
59 DESCRIPTION
60 -----------
62 List commits that are reachable by following the `parent` links from the
63 given commit(s), but exclude commits that are reachable from the one(s)
64 given with a '{caret}' in front of them.  The output is given in reverse
65 chronological order by default.
67 You can think of this as a set operation.  Commits given on the command
68 line form a set of commits that are reachable from any of them, and then
69 commits reachable from any of the ones given with '{caret}' in front are
70 subtracted from that set.  The remaining commits are what comes out in the
71 command's output.  Various other options and paths parameters can be used
72 to further limit the result.
74 Thus, the following command:
76 -----------------------------------------------------------------------
77         $ git rev-list foo bar ^baz
78 -----------------------------------------------------------------------
80 means "list all the commits which are reachable from 'foo' or 'bar', but
81 not from 'baz'".
83 A special notation "'<commit1>'..'<commit2>'" can be used as a
84 short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of
85 the following may be used interchangeably:
87 -----------------------------------------------------------------------
88         $ git rev-list origin..HEAD
89         $ git rev-list HEAD ^origin
90 -----------------------------------------------------------------------
92 Another special notation is "'<commit1>'...'<commit2>'" which is useful
93 for merges.  The resulting set of commits is the symmetric difference
94 between the two operands.  The following two commands are equivalent:
96 -----------------------------------------------------------------------
97         $ git rev-list A B --not $(git merge-base --all A B)
98         $ git rev-list A...B
99 -----------------------------------------------------------------------
101 'rev-list' is a very essential git command, since it
102 provides the ability to build and traverse commit ancestry graphs. For
103 this reason, it has a lot of different options that enables it to be
104 used by commands as different as 'git bisect' and
105 'git repack'.
107 OPTIONS
108 -------
110 :git-rev-list: 1
111 include::rev-list-options.txt[]
113 include::pretty-formats.txt[]
116 Author
117 ------
118 Written by Linus Torvalds <torvalds@osdl.org>
120 Documentation
121 --------------
122 Documentation by David Greaves, Junio C Hamano, Jonas Fonseca
123 and the git-list <git@vger.kernel.org>.
127 Part of the linkgit:git[1] suite