Documentation / git-rev-list.txton commit Merge branch 'fixes' (2af60a0)
   1git-rev-list(1)
   2===============
   3v0.1, May 2005
   4
   5NAME
   6----
   7git-rev-list - Lists commit objects in reverse chronological order
   8
   9
  10SYNOPSIS
  11--------
  12'git-rev-list' [ *--max-count*=number ] [ *--max-age*=timestamp ] [ *--min-age*=timestamp ] [ *--bisect* ] [ *--pretty* ] [ *--objects* ] [ *--merge-order* [ *--show-breaks* ] ] <commit> [ <commit> ...] [ ^<commit> ...]
  13
  14DESCRIPTION
  15-----------
  16Lists commit objects in reverse chronological order starting at the
  17given commit(s), taking ancestry relationship into account.  This is
  18useful to produce human-readable log output.
  19
  20Commits which are stated with a preceding '^' cause listing to stop at
  21that point. Their parents are implied. "git-rev-list foo bar ^baz" thus
  22means "list all the commits which are included in 'foo' and 'bar', but
  23not in 'baz'".
  24
  25OPTIONS
  26-------
  27--pretty::
  28        Print the contents of the commit changesets in human-readable form.
  29
  30--objects::
  31        Print the object IDs of any object referenced by the listed commits.
  32        'git-rev-list --objects foo ^bar' thus means "send me all object IDs
  33        which I need to download if I have the commit object 'bar', but
  34        not 'foo'".
  35
  36--bisect::
  37        Limit output to the one commit object which is roughly halfway
  38        between the included and excluded commits. Thus, if 'git-rev-list
  39        --bisect foo ^bar ^baz' outputs 'midpoint', the output
  40        of 'git-rev-list foo ^midpoint' and 'git-rev-list midpoint
  41        ^bar ^baz' would be of roughly the same length. Finding the change
  42        which introduces a regression is thus reduced to a binary search:
  43        repeatedly generate and test new 'midpoint's until the commit chain
  44        is of length one.
  45
  46--merge-order::
  47        When specified the commit history is decomposed into a unique
  48        sequence of minimal, non-linear epochs and maximal, linear epochs.
  49        Non-linear epochs are then linearised by sorting them into merge
  50        order, which is described below.
  51+
  52Maximal, linear epochs correspond to periods of sequential development.
  53Minimal, non-linear epochs correspond to periods of divergent development
  54followed by a converging merge. The theory of epochs is described in more
  55detail at
  56link:http://blackcubes.dyndns.org/epoch/[http://blackcubes.dyndns.org/epoch/].
  57+
  58The merge order for a non-linear epoch is defined as a linearisation for which
  59the following invariants are true:
  60+
  61    1. if a commit P is reachable from commit N, commit P sorts after commit N
  62       in the linearised list.
  63    2. if Pi and Pj are any two parents of a merge M (with i < j), then any
  64       commit N, such that N is reachable from Pj but not reachable from Pi,
  65       sorts before all commits reachable from Pi.
  66+
  67Invariant 1 states that later commits appear before earlier commits they are
  68derived from.
  69+
  70Invariant 2 states that commits unique to "later" parents in a merge, appear
  71before all commits from "earlier" parents of a merge.
  72
  73--show-breaks::
  74        Each item of the list is output with a 2-character prefix consisting
  75        of one of: (|), (^), (=) followed by a space.
  76+
  77Commits marked with (=) represent the boundaries of minimal, non-linear epochs
  78and correspond either to the start of a period of divergent development or to
  79the end of such a period.
  80+
  81Commits marked with (|) are direct parents of commits immediately preceding
  82the marked commit in the list.
  83+
  84Commits marked with (^) are not parents of the immediately preceding commit.
  85These "breaks" represent necessary discontinuities implied by trying to
  86represent an arbtirary DAG in a linear form.
  87+
  88*--show-breaks* is only valid if *--merge-order* is also specified.
  89
  90Author
  91------
  92Written by Linus Torvalds <torvalds@osdl.org>
  93
  94Original *--merge-order* logic by Jon Seymour <jon.seymour@gmail.com>
  95
  96Documentation
  97--------------
  98Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
  99
 100GIT
 101---
 102Part of the gitlink:git[7] suite
 103