Documentation / git-rev-list.txton commit Merge http://www.kernel.org/pub/scm/gitk/gitk (1301c6e)
   1git-rev-list(1)
   2===============
   3
   4NAME
   5----
   6git-rev-list - Lists commit objects in reverse chronological order
   7
   8
   9SYNOPSIS
  10--------
  11'git-rev-list' [ *--max-count*=number ] [ *--max-age*=timestamp ] [ *--min-age*=timestamp ] [ *--bisect* ] [ *--pretty* ] [ *--objects* ] [ *--merge-order* [ *--show-breaks* ] ] <commit> [ <commit> ...] [ ^<commit> ...]
  12
  13DESCRIPTION
  14-----------
  15Lists commit objects in reverse chronological order starting at the
  16given commit(s), taking ancestry relationship into account.  This is
  17useful to produce human-readable log output.
  18
  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
  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+
  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/].
  56+
  57The merge order for a non-linear epoch is defined as a linearisation for which
  58the following invariants are true:
  59+
  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.
  65+
  66Invariant 1 states that later commits appear before earlier commits they are
  67derived from.
  68+
  69Invariant 2 states that commits unique to "later" parents in a merge, appear
  70before all commits from "earlier" parents of a merge.
  71
  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+
  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.
  79+
  80Commits marked with (|) are direct parents of commits immediately preceding
  81the marked commit in the list.
  82+
  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.
  86+
  87*--show-breaks* is only valid if *--merge-order* is also specified.
  88
  89Author
  90------
  91Written by Linus Torvalds <torvalds@osdl.org>
  92
  93Original *--merge-order* logic by Jon Seymour <jon.seymour@gmail.com>
  94
  95Documentation
  96--------------
  97Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
  98
  99GIT
 100---
 101Part of the gitlink:git[7] suite
 102