Merge branch 'mm/credential-plumbing'
[gitweb.git] / Documentation / rev-list-options.txt
index a9de9a74dc71e71e776cf1b7acd667d5c01582f7..84e34b1abaf23ef87fcccd21b0500fd21c5a1912 100644 (file)
@@ -72,11 +72,26 @@ endif::git-rev-list[]
 
 --merges::
 
-       Print only merge commits.
+       Print only merge commits. This is exactly the same as `--min-parents=2`.
 
 --no-merges::
 
-       Do not print commits with more than one parent.
+       Do not print commits with more than one parent. This is
+       exactly the same as `--max-parents=1`.
+
+--min-parents=<number>::
+--max-parents=<number>::
+--no-min-parents::
+--no-max-parents::
+
+       Show only commits which have at least (or at most) that many
+       commits. In particular, `--max-parents=1` is the same as `--no-merges`,
+       `--min-parents=2` is the same as `--merges`.  `--max-parents=0`
+       gives all root commits and `--min-parents=3` all octopus merges.
++
+`--no-min-parents` and `--no-max-parents` reset these limits (to no limit)
+again.  Equivalent forms are `--min-parents=0` (any commit has 0 or more
+parents) and `--max-parents=-1` (negative numbers denote no upper limit).
 
 --first-parent::
        Follow only the first parent commit upon seeing a merge
@@ -102,28 +117,32 @@ endif::git-rev-list[]
        Pretend as if all the refs in `refs/heads` are listed
        on the command line as '<commit>'. If '<pattern>' is given, limit
        branches to ones matching given shell glob. If pattern lacks '?',
-       '*', or '[', '/*' at the end is implied.
+       '{asterisk}', or '[', '/{asterisk}' at the end is implied.
 
 --tags[=<pattern>]::
 
        Pretend as if all the refs in `refs/tags` are listed
        on the command line as '<commit>'. If '<pattern>' is given, limit
-       tags to ones matching given shell glob. If pattern lacks '?', '*',
-       or '[', '/*' at the end is implied.
+       tags to ones matching given shell glob. If pattern lacks '?', '{asterisk}',
+       or '[', '/{asterisk}' at the end is implied.
 
 --remotes[=<pattern>]::
 
        Pretend as if all the refs in `refs/remotes` are listed
        on the command line as '<commit>'. If '<pattern>' is given, limit
        remote-tracking branches to ones matching given shell glob.
-       If pattern lacks '?', '*', or '[', '/*' at the end is implied.
+       If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied.
 
 --glob=<glob-pattern>::
        Pretend as if all the refs matching shell glob '<glob-pattern>'
        are listed on the command line as '<commit>'. Leading 'refs/',
-       is automatically prepended if missing. If pattern lacks '?', '*',
-       or '[', '/*' at the end is implied.
+       is automatically prepended if missing. If pattern lacks '?', '{asterisk}',
+       or '[', '/{asterisk}' at the end is implied.
 
+--ignore-missing::
+
+       Upon seeing an invalid object name in the input, pretend as if
+       the bad input was not given.
 
 ifndef::git-rev-list[]
 --bisect::
@@ -151,6 +170,11 @@ ifdef::git-rev-list[]
        to /dev/null as the output does not have to be formatted.
 endif::git-rev-list[]
 
+--cherry-mark::
+
+       Like `--cherry-pick` (see below) but mark equivalent commits
+       with `=` rather than omitting them, and inequivalent ones with `+`.
+
 --cherry-pick::
 
        Omit any commit that introduces the same change as
@@ -165,6 +189,27 @@ from the other branch (for example, "3rd on b" may be cherry-picked
 from branch A).  With this option, such pairs of commits are
 excluded from the output.
 
+--left-only::
+--right-only::
+
+       List only commits on the respective side of a symmetric range,
+       i.e. only those which would be marked `<` resp. `>` by
+       `--left-right`.
++
+For example, `--cherry-pick --right-only A...B` omits those
+commits from `B` which are in `A` or are patch-equivalent to a commit in
+`A`. In other words, this lists the `+` commits from `git cherry A B`.
+More precisely, `--cherry-pick --right-only --no-merges` gives the exact
+list.
+
+--cherry::
+
+       A synonym for `--right-only --cherry-mark --no-merges`; useful to
+       limit the output to the commits on our side and mark those that
+       have been applied to the other side of a forked history with
+       `git log --cherry upstream...mybranch`, similar to
+       `git cherry upstream mybranch`.
+
 -g::
 --walk-reflogs::
 
@@ -227,7 +272,7 @@ Default mode::
 
 --full-history::
 
-       As the default mode but does not prune some history.
+       Same as the default mode, but does not prune some history.
 
 --dense::
 
@@ -268,7 +313,7 @@ that you are filtering for a file `foo` in this commit graph:
         \   /   /   /   /
          `-------------'
 -----------------------------------------------------------------------
-The horizontal line of history A--P is taken to be the first parent of
+The horizontal line of history A---P is taken to be the first parent of
 each merge.  The commits are:
 
 * `I` is the initial commit, in which `foo` exists with contents
@@ -410,7 +455,7 @@ The effect of this is best shown by way of comparing to
          `---------'
 -----------------------------------------------------------------------
 +
-Note the major differences in `N` and `P` over '\--full-history':
+Note the major differences in `N` and `P` over '--full-history':
 +
 --
 * `N`'s parent list had `I` removed, because it is an ancestor of the
@@ -449,7 +494,7 @@ of course).
 When we want to find out what commits in `M` are contaminated with the
 bug introduced by `D` and need fixing, however, we might want to view
 only the subset of 'D..M' that are actually descendants of `D`, i.e.
-excluding `C` and `K`. This is exactly what the '\--ancestry-path'
+excluding `C` and `K`. This is exactly what the '--ancestry-path'
 option does. Applied to the 'D..M' range, it results in:
 +
 -----------------------------------------------------------------------
@@ -577,6 +622,7 @@ These options are mostly targeted for packing of git repositories.
 --no-walk::
 
        Only show the given revs, but do not traverse their ancestors.
+       This has no effect if a range is specified.
 
 --do-walk::
 
@@ -689,7 +735,10 @@ ifdef::git-rev-list[]
        Print a number stating how many commits would have been
        listed, and suppress all other output.  When used together
        with '--left-right', instead print the counts for left and
-       right commits, separated by a tab.
+       right commits, separated by a tab. When used together with
+       '--cherry-mark', omit patch equivalent commits from these
+       counts and print the count for equivalent commits separated
+       by a tab.
 endif::git-rev-list[]