<p>Lists commit objects in reverse chronological order starting at the\r
given commit(s), taking ancestry relationship into account. This is\r
useful to produce human-readable log output.</p>\r
-<p>Commits which are stated with a preceding <em>^</em> cause listing to stop at\r
-that point. Their parents are implied. "git-rev-list foo bar ^baz" thus\r
-means "list all the commits which are included in <em>foo</em> and <em>bar</em>, but\r
+<p>Commits which are stated with a preceding <em>^</em> cause listing to\r
+stop at that point. Their parents are implied. Thus the following\r
+command:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt> $ git-rev-list foo bar ^baz</tt></pre>\r
+</div></div>\r
+<p>means "list all the commits which are included in <em>foo</em> and <em>bar</em>, but\r
not in <em>baz</em>".</p>\r
-<p>A special notation <commit1>..<commit2> can be used as a\r
-short-hand for ^<commit1> <commit2>.</p>\r
-<p>Another special notation is <commit1>…<commit2> which is useful for\r
-merges. The resulting set of commits is the symmetric difference\r
+<p>A special notation "<em><commit1></em>..<em><commit2></em>" can be used as a\r
+short-hand for "^<em><commit1></em> <em><commit2></em>". For example, either of\r
+the following may be used interchangeably:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt> $ git-rev-list origin..HEAD\r
+ $ git-rev-list HEAD ^origin</tt></pre>\r
+</div></div>\r
+<p>Another special notation is "<em><commit1></em>…<em><commit2></em>" which is useful\r
+for merges. The resulting set of commits is the symmetric difference\r
between the two operands. The following two commands are equivalent:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ git-rev-list A B --not $(git-merge-base --all A B)\r
-$ git-rev-list A...B</tt></pre>\r
+<pre><tt> $ git-rev-list A B --not $(git-merge-base --all A B)\r
+ $ git-rev-list A...B</tt></pre>\r
</div></div>\r
+<p><a href="git-rev-list.html">git-rev-list(1)</a> is a very essential git program, since it\r
+provides the ability to build and traverse commit ancestry graphs. For\r
+this reason, it has a lot of different options that enables it to be\r
+used by commands as different as <a href="git-bisect.html">git-bisect(1)</a> and\r
+<a href="git-repack.html">git-repack(1)</a>.</p>\r
</div>\r
<h2>OPTIONS</h2>\r
<div class="sectionbody">\r
+<h3>Commit Formatting</h3>\r
+<p>Using these options, <a href="git-rev-list.html">git-rev-list(1)</a> will act similar to the\r
+more specialized family of commit log tools: <a href="git-log.html">git-log(1)</a>,\r
+<a href="git-show.html">git-show(1)</a>, and <a href="git-whatchanged.html">git-whatchanged(1)</a></p>\r
<dl>\r
<dt>\r
---pretty\r
+--pretty[=<em><format></em>]\r
+</dt>\r
+<dd>\r
+<p>\r
+ Pretty print the contents of the commit logs in a given format,\r
+ where <em><format></em> can be one of <em>raw</em>, <em>medium</em>, <em>short</em>, <em>full</em>,\r
+ and <em>oneline</em>. When left out the format default to <em>medium</em>.\r
+</p>\r
+</dd>\r
+<dt>\r
+--relative-date\r
</dt>\r
<dd>\r
<p>\r
- Print the contents of the commit changesets in human-readable form.\r
+ Show dates relative to the current time, e.g. "2 hours ago".\r
+ Only takes effect for dates shown in human-readable format, such\r
+ as when using "--pretty".\r
</p>\r
</dd>\r
<dt>\r
</dt>\r
<dd>\r
<p>\r
- Print the contents of the commit in raw-format; each\r
- record is separated with a NUL character.\r
+ Print the contents of the commit in raw-format; each record is\r
+ separated with a NUL character.\r
</p>\r
</dd>\r
<dt>\r
Print the parents of the commit.\r
</p>\r
</dd>\r
+</dl>\r
+<h3>Diff Formatting</h3>\r
+<p>Below are listed options that control the formatting of diff output.\r
+Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff\r
+options may be given. See <a href="git-diff-files.html">git-diff-files(1)</a> for more options.</p>\r
+<dl>\r
<dt>\r
---objects\r
+-c\r
</dt>\r
<dd>\r
<p>\r
- Print the object IDs of any object referenced by the listed commits.\r
- <em>git-rev-list --objects foo ^bar</em> thus means "send me all object IDs\r
- which I need to download if I have the commit object <em>bar</em>, but\r
- not <em>foo</em>".\r
+ This flag changes the way a merge commit is displayed. It shows\r
+ the differences from each of the parents to the merge result\r
+ simultaneously instead of showing pairwise diff between a parent\r
+ and the result one at a time. Furthermore, it lists only files\r
+ which were modified from all parents.\r
</p>\r
</dd>\r
<dt>\r
---objects-edge\r
+--cc\r
</dt>\r
<dd>\r
<p>\r
- Similar to <tt>--objects</tt>, but also print the IDs of\r
- excluded commits prefixed with a <tt>-</tt> character. This is\r
- used by <tt>git-pack-objects</tt> to build <em>thin</em> pack, which\r
- records objects in deltified form based on objects\r
- contained in these excluded commits to reduce network\r
- traffic.\r
+ This flag implies the <em>-c</em> options and further compresses the\r
+ patch output by omitting hunks that show differences from only\r
+ one parent, or show the same change from all but one parent for\r
+ an Octopus merge.\r
</p>\r
</dd>\r
<dt>\r
---unpacked\r
+-r\r
</dt>\r
<dd>\r
<p>\r
- Only useful with <tt>--objects</tt>; print the object IDs that\r
- are not in packs.\r
+ Show recursive diffs.\r
</p>\r
</dd>\r
<dt>\r
---bisect\r
+-t\r
</dt>\r
<dd>\r
<p>\r
- Limit output to the one commit object which is roughly halfway\r
- between the included and excluded commits. Thus, if <em>git-rev-list\r
- --bisect foo ^bar ^baz</em> outputs <em>midpoint</em>, the output\r
- of <em>git-rev-list foo ^midpoint</em> and <em>git-rev-list midpoint\r
- ^bar ^baz</em> would be of roughly the same length.\r
- Finding the change\r
- which introduces a regression is thus reduced to a binary search:\r
- repeatedly generate and test new 'midpoint's until the commit chain\r
- is of length one.\r
+ Show the tree objects in the diff output. This implies <em>-r</em>.\r
</p>\r
</dd>\r
+</dl>\r
+<h3>Commit Limiting</h3>\r
+<p>Besides specifying a range of commits that should be listed using the\r
+special notations explained in the description, additional commit\r
+limiting may be applied.</p>\r
+<dl>\r
<dt>\r
---max-count\r
+-n <em>number</em>, --max-count=<em>number</em>\r
</dt>\r
<dd>\r
<p>\r
</p>\r
</dd>\r
<dt>\r
---max-age=timestamp, --min-age=timestamp\r
+--since=<em>date</em>, --after=<em>date</em>\r
</dt>\r
<dd>\r
<p>\r
- Limit the commits output to specified time range.\r
+ Show commits more recent than a specific date.\r
</p>\r
</dd>\r
<dt>\r
---sparse\r
+--until=<em>date</em>, --before=<em>date</em>\r
</dt>\r
<dd>\r
<p>\r
- When optional paths are given, the command outputs only\r
- the commits that changes at least one of them, and also\r
- ignores merges that do not touch the given paths. This\r
- flag makes the command output all eligible commits\r
- (still subject to count and age limitation), but apply\r
- merge simplification nevertheless.\r
+ Show commits older than a specific date.\r
+</p>\r
+</dd>\r
+<dt>\r
+--max-age=<em>timestamp</em>, --min-age=<em>timestamp</em>\r
+</dt>\r
+<dd>\r
+<p>\r
+ Limit the commits output to specified time range.\r
</p>\r
</dd>\r
<dt>\r
</dt>\r
<dd>\r
<p>\r
- Reverses the meaning of the <em>^</em> prefix (or lack\r
- thereof) for all following revision specifiers, up to\r
- the next <tt>--not</tt>.\r
+ Reverses the meaning of the <em>^</em> prefix (or lack thereof)\r
+ for all following revision specifiers, up to the next <em>--not</em>.\r
</p>\r
</dd>\r
<dt>\r
</dt>\r
<dd>\r
<p>\r
- Pretend as if all the refs in <tt>$GIT_DIR/refs/</tt> are\r
- listed on the command line as <commit>.\r
+ Pretend as if all the refs in <tt>$GIT_DIR/refs/</tt> are listed on the\r
+ command line as <em><commit></em>.\r
+</p>\r
+</dd>\r
+<dt>\r
+--merge\r
+</dt>\r
+<dd>\r
+<p>\r
+ After a failed merge, show refs that touch files having a\r
+ conflict and don't exist on all heads to merge.\r
+</p>\r
+</dd>\r
+<dt>\r
+--boundary\r
+</dt>\r
+<dd>\r
+<p>\r
+ Output uninteresting commits at the boundary, which are usually\r
+ not shown.\r
+</p>\r
+</dd>\r
+<dt>\r
+--dense, --sparse\r
+</dt>\r
+<dd>\r
+<p>\r
+When optional paths are given, the default behaviour (<em>--dense</em>) is to\r
+only output commits that changes at least one of them, and also ignore\r
+merges that do not touch the given paths.\r
+</p>\r
+<p>Use the <em>--sparse</em> flag to makes the command output all eligible commits\r
+(still subject to count and age limitation), but apply merge\r
+simplification nevertheless.</p>\r
+</dd>\r
+<dt>\r
+--bisect\r
+</dt>\r
+<dd>\r
+<p>\r
+Limit output to the one commit object which is roughly halfway between\r
+the included and excluded commits. Thus, if\r
</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt> $ git-rev-list --bisect foo ^bar ^baz</tt></pre>\r
+</div></div>\r
+<p>outputs <em>midpoint</em>, the output of the two commands</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt> $ git-rev-list foo ^midpoint\r
+ $ git-rev-list midpoint ^bar ^baz</tt></pre>\r
+</div></div>\r
+<p>would be of roughly the same length. Finding the change which\r
+introduces a regression is thus reduced to a binary search: repeatedly\r
+generate and test new 'midpoint's until the commit chain is of length\r
+one.</p>\r
</dd>\r
+</dl>\r
+<h3>Commit Ordering</h3>\r
+<p>By default, the commits are shown in reverse chronological order.</p>\r
+<dl>\r
<dt>\r
--topo-order\r
</dt>\r
<dd>\r
<p>\r
- By default, the commits are shown in reverse\r
- chronological order. This option makes them appear in\r
- topological order (i.e. descendant commits are shown\r
- before their parents).\r
+ This option makes them appear in topological order (i.e.\r
+ descendant commits are shown before their parents).\r
</p>\r
</dd>\r
<dt>\r
---merge\r
+--date-order\r
</dt>\r
<dd>\r
<p>\r
- After a failed merge, show refs that touch files having a\r
- conflict and don't exist on all heads to merge.\r
+ This option is similar to <em>--topo-order</em> in the sense that no\r
+ parent comes before all of its children, but otherwise things\r
+ are still ordered in the commit timestamp order.\r
</p>\r
</dd>\r
+</dl>\r
+<h3>Object Traversal</h3>\r
+<p>These options are mostly targeted for packing of git repositories.</p>\r
+<dl>\r
<dt>\r
---relative-date\r
+--objects\r
</dt>\r
<dd>\r
<p>\r
- Show dates relative to the current time, e.g. "2 hours ago".\r
- Only takes effect for dates shown in human-readable format,\r
- such as when using "--pretty".\r
+ Print the object IDs of any object referenced by the listed\r
+ commits. <em>git-rev-list --objects foo ^bar</em> thus means "send me\r
+ all object IDs which I need to download if I have the commit\r
+ object <em>bar</em>, but not <em>foo</em>".\r
+</p>\r
+</dd>\r
+<dt>\r
+--objects-edge\r
+</dt>\r
+<dd>\r
+<p>\r
+ Similar to <em>--objects</em>, but also print the IDs of excluded\r
+ commits prefixed with a "-" character. This is used by\r
+ <a href="git-pack-objects.html">git-pack-objects(1)</a> to build "thin" pack, which records\r
+ objects in deltified form based on objects contained in these\r
+ excluded commits to reduce network traffic.\r
+</p>\r
+</dd>\r
+<dt>\r
+--unpacked\r
+</dt>\r
+<dd>\r
+<p>\r
+ Only useful with <em>--objects</em>; print the object IDs that are not\r
+ in packs.\r
</p>\r
</dd>\r
</dl>\r
</div>\r
<h2>Documentation</h2>\r
<div class="sectionbody">\r
-<p>Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.</p>\r
+<p>Documentation by David Greaves, Junio C Hamano, Jonas Fonseca\r
+and the git-list <git@vger.kernel.org>.</p>\r
</div>\r
<h2>GIT</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 29-Aug-2006 04:02:36 UTC\r
+Last updated 03-Sep-2006 06:18:19 UTC\r
</div>\r
</div>\r
</body>\r
DESCRIPTION
-----------
+
Lists commit objects in reverse chronological order starting at the
given commit(s), taking ancestry relationship into account. This is
useful to produce human-readable log output.
-Commits which are stated with a preceding '{caret}' cause listing to stop at
-that point. Their parents are implied. "git-rev-list foo bar {caret}baz" thus
+Commits which are stated with a preceding '{caret}' cause listing to
+stop at that point. Their parents are implied. Thus the following
+command:
+
+-----------------------------------------------------------------------
+ $ git-rev-list foo bar ^baz
+-----------------------------------------------------------------------
+
means "list all the commits which are included in 'foo' and 'bar', but
not in 'baz'".
-A special notation <commit1>..<commit2> can be used as a
-short-hand for {caret}<commit1> <commit2>.
+A special notation "'<commit1>'..'<commit2>'" can be used as a
+short-hand for "{caret}'<commit1>' '<commit2>'". For example, either of
+the following may be used interchangeably:
-Another special notation is <commit1>...<commit2> which is useful for
-merges. The resulting set of commits is the symmetric difference
+-----------------------------------------------------------------------
+ $ git-rev-list origin..HEAD
+ $ git-rev-list HEAD ^origin
+-----------------------------------------------------------------------
+
+Another special notation is "'<commit1>'...'<commit2>'" which is useful
+for merges. The resulting set of commits is the symmetric difference
between the two operands. The following two commands are equivalent:
-------------
-$ git-rev-list A B --not $(git-merge-base --all A B)
-$ git-rev-list A...B
-------------
+-----------------------------------------------------------------------
+ $ git-rev-list A B --not $(git-merge-base --all A B)
+ $ git-rev-list A...B
+-----------------------------------------------------------------------
+
+gitlink:git-rev-list[1] is a very essential git program, since it
+provides the ability to build and traverse commit ancestry graphs. For
+this reason, it has a lot of different options that enables it to be
+used by commands as different as gitlink:git-bisect[1] and
+gitlink:git-repack[1].
OPTIONS
-------
---pretty::
- Print the contents of the commit changesets in human-readable form.
+
+Commit Formatting
+~~~~~~~~~~~~~~~~~
+
+Using these options, gitlink:git-rev-list[1] will act similar to the
+more specialized family of commit log tools: gitlink:git-log[1],
+gitlink:git-show[1], and gitlink:git-whatchanged[1]
+
+--pretty[='<format>']::
+
+ Pretty print the contents of the commit logs in a given format,
+ where '<format>' can be one of 'raw', 'medium', 'short', 'full',
+ and 'oneline'. When left out the format default to 'medium'.
+
+--relative-date::
+
+ Show dates relative to the current time, e.g. "2 hours ago".
+ Only takes effect for dates shown in human-readable format, such
+ as when using "--pretty".
--header::
- Print the contents of the commit in raw-format; each
- record is separated with a NUL character.
+
+ Print the contents of the commit in raw-format; each record is
+ separated with a NUL character.
--parents::
+
Print the parents of the commit.
---objects::
- Print the object IDs of any object referenced by the listed commits.
- 'git-rev-list --objects foo ^bar' thus means "send me all object IDs
- which I need to download if I have the commit object 'bar', but
- not 'foo'".
+Diff Formatting
+~~~~~~~~~~~~~~~
---objects-edge::
- Similar to `--objects`, but also print the IDs of
- excluded commits prefixed with a `-` character. This is
- used by `git-pack-objects` to build 'thin' pack, which
- records objects in deltified form based on objects
- contained in these excluded commits to reduce network
- traffic.
+Below are listed options that control the formatting of diff output.
+Some of them are specific to gitlink:git-rev-list[1], however other diff
+options may be given. See gitlink:git-diff-files[1] for more options.
---unpacked::
- Only useful with `--objects`; print the object IDs that
- are not in packs.
+-c::
+
+ This flag changes the way a merge commit is displayed. It shows
+ the differences from each of the parents to the merge result
+ simultaneously instead of showing pairwise diff between a parent
+ and the result one at a time. Furthermore, it lists only files
+ which were modified from all parents.
+
+--cc::
+
+ This flag implies the '-c' options and further compresses the
+ patch output by omitting hunks that show differences from only
+ one parent, or show the same change from all but one parent for
+ an Octopus merge.
+
+-r::
+
+ Show recursive diffs.
+
+-t::
+
+ Show the tree objects in the diff output. This implies '-r'.
+
+Commit Limiting
+~~~~~~~~~~~~~~~
+
+Besides specifying a range of commits that should be listed using the
+special notations explained in the description, additional commit
+limiting may be applied.
+
+--
+
+-n 'number', --max-count='number'::
---bisect::
- Limit output to the one commit object which is roughly halfway
- between the included and excluded commits. Thus, if 'git-rev-list
- --bisect foo {caret}bar {caret}baz' outputs 'midpoint', the output
- of 'git-rev-list foo {caret}midpoint' and 'git-rev-list midpoint
- {caret}bar {caret}baz' would be of roughly the same length.
- Finding the change
- which introduces a regression is thus reduced to a binary search:
- repeatedly generate and test new 'midpoint's until the commit chain
- is of length one.
-
---max-count::
Limit the number of commits output.
---max-age=timestamp, --min-age=timestamp::
- Limit the commits output to specified time range.
+--since='date', --after='date'::
+
+ Show commits more recent than a specific date.
+
+--until='date', --before='date'::
---sparse::
- When optional paths are given, the command outputs only
- the commits that changes at least one of them, and also
- ignores merges that do not touch the given paths. This
- flag makes the command output all eligible commits
- (still subject to count and age limitation), but apply
- merge simplification nevertheless.
+ Show commits older than a specific date.
+
+--max-age='timestamp', --min-age='timestamp'::
+
+ Limit the commits output to specified time range.
--remove-empty::
+
Stop when a given path disappears from the tree.
--no-merges::
+
Do not print commits with more than one parent.
--not::
- Reverses the meaning of the '{caret}' prefix (or lack
- thereof) for all following revision specifiers, up to
- the next `--not`.
+
+ Reverses the meaning of the '{caret}' prefix (or lack thereof)
+ for all following revision specifiers, up to the next '--not'.
--all::
- Pretend as if all the refs in `$GIT_DIR/refs/` are
- listed on the command line as <commit>.
---topo-order::
- By default, the commits are shown in reverse
- chronological order. This option makes them appear in
- topological order (i.e. descendant commits are shown
- before their parents).
+ Pretend as if all the refs in `$GIT_DIR/refs/` are listed on the
+ command line as '<commit>'.
--merge::
+
After a failed merge, show refs that touch files having a
conflict and don't exist on all heads to merge.
---relative-date::
- Show dates relative to the current time, e.g. "2 hours ago".
- Only takes effect for dates shown in human-readable format,
- such as when using "--pretty".
+--boundary::
+
+ Output uninteresting commits at the boundary, which are usually
+ not shown.
+
+--dense, --sparse::
+
+When optional paths are given, the default behaviour ('--dense') is to
+only output commits that changes at least one of them, and also ignore
+merges that do not touch the given paths.
+
+Use the '--sparse' flag to makes the command output all eligible commits
+(still subject to count and age limitation), but apply merge
+simplification nevertheless.
+
+--bisect::
+
+Limit output to the one commit object which is roughly halfway between
+the included and excluded commits. Thus, if
+
+-----------------------------------------------------------------------
+ $ git-rev-list --bisect foo ^bar ^baz
+-----------------------------------------------------------------------
+
+outputs 'midpoint', the output of the two commands
+
+-----------------------------------------------------------------------
+ $ git-rev-list foo ^midpoint
+ $ git-rev-list midpoint ^bar ^baz
+-----------------------------------------------------------------------
+
+would be of roughly the same length. Finding the change which
+introduces a regression is thus reduced to a binary search: repeatedly
+generate and test new 'midpoint's until the commit chain is of length
+one.
+
+--
+
+Commit Ordering
+~~~~~~~~~~~~~~~
+
+By default, the commits are shown in reverse chronological order.
+
+--topo-order::
+
+ This option makes them appear in topological order (i.e.
+ descendant commits are shown before their parents).
+
+--date-order::
+
+ This option is similar to '--topo-order' in the sense that no
+ parent comes before all of its children, but otherwise things
+ are still ordered in the commit timestamp order.
+
+Object Traversal
+~~~~~~~~~~~~~~~~
+
+These options are mostly targeted for packing of git repositories.
+
+--objects::
+
+ Print the object IDs of any object referenced by the listed
+ commits. 'git-rev-list --objects foo ^bar' thus means "send me
+ all object IDs which I need to download if I have the commit
+ object 'bar', but not 'foo'".
+
+--objects-edge::
+
+ Similar to '--objects', but also print the IDs of excluded
+ commits prefixed with a "-" character. This is used by
+ gitlink:git-pack-objects[1] to build "thin" pack, which records
+ objects in deltified form based on objects contained in these
+ excluded commits to reduce network traffic.
+
+--unpacked::
+
+ Only useful with '--objects'; print the object IDs that are not
+ in packs.
Author
------
Documentation
--------------
-Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
+Documentation by David Greaves, Junio C Hamano, Jonas Fonseca
+and the git-list <git@vger.kernel.org>.
GIT
---
Part of the gitlink:git[7] suite
-