<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
<head>\r
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 7.0.1" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
<style type="text/css">\r
/* Debug borders */\r
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
</div>\r
<h2>SYNOPSIS</h2>\r
<div class="sectionbody">\r
-<p><em>git-diff-tree</em> [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty] [-t] [-r] [--root] [<common diff options>] <tree-ish> [<tree-ish>] [<path>…]</p>\r
+<div class="verseblock">\r
+<div class="content"><em>git-diff-tree</em> [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty]\r
+ [-t] [-r] [-c | --cc] [--root] [<common diff options>]\r
+ <tree-ish> [<tree-ish>] [<path>…]</div></div>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
</p>\r
</dd>\r
<dt>\r
+--patch-with-raw\r
+</dt>\r
+<dd>\r
+<p>\r
+ Generate patch but keep also the default raw diff output.\r
+</p>\r
+</dd>\r
+<dt>\r
+--stat\r
+</dt>\r
+<dd>\r
+<p>\r
+ Generate a diffstat instead of a patch.\r
+</p>\r
+</dd>\r
+<dt>\r
+--summary\r
+</dt>\r
+<dd>\r
+<p>\r
+ Output a condensed summary of extended header information\r
+ such as creations, renames and mode changes.\r
+</p>\r
+</dd>\r
+<dt>\r
+--patch-with-stat\r
+</dt>\r
+<dd>\r
+<p>\r
+ Generate patch and prepend its diffstat.\r
+</p>\r
+</dd>\r
+<dt>\r
-z\r
</dt>\r
<dd>\r
<p>\r
Instead of showing the full 40-byte hexadecimal object\r
name in diff-raw format output and diff-tree header\r
- lines, show only handful dhexigits prefix. This is\r
+ lines, show only handful hexdigits prefix. This is\r
independent of --full-index option above, which controls\r
the diff-patch output format. Non default number of\r
digits can be specified with --abbrev=<n>.\r
</p>\r
</dd>\r
<dt>\r
+--diff-filter=[ACDMRTUXB*]\r
+</dt>\r
+<dd>\r
+<p>\r
+ Select only files that are Added (<tt>A</tt>), Copied (<tt>C</tt>),\r
+ Deleted (<tt>D</tt>), Modified (<tt>M</tt>), Renamed (<tt>R</tt>), have their\r
+ type (mode) changed (<tt>T</tt>), are Unmerged (<tt>U</tt>), are\r
+ Unknown (<tt>X</tt>), or have had their pairing Broken (<tt>B</tt>).\r
+ Any combination of the filter characters may be used.\r
+ When <tt>*</tt> (All-or-none) is added to the combination, all\r
+ paths are selected if there is any file that matches\r
+ other criteria in the comparison; if there is no file\r
+ that matches other criteria, nothing is selected.\r
+</p>\r
+</dd>\r
+<dt>\r
--find-copies-harder\r
</dt>\r
<dd>\r
</p>\r
</dd>\r
<dt>\r
+--pickaxe-regex\r
+</dt>\r
+<dd>\r
+<p>\r
+ Make the <string> not a plain string but an extended POSIX\r
+ regex to match.\r
+</p>\r
+</dd>\r
+<dt>\r
-O<orderfile>\r
</dt>\r
<dd>\r
<p>\r
By default, "git-diff-tree --stdin" does not show\r
differences for merge commits. With this flag, it shows\r
- differences to that commit from all of its parents.\r
+ differences to that commit from all of its parents. See\r
+ also <em>-c</em>.\r
</p>\r
</dd>\r
<dt>\r
<p>\r
By default, "git-diff-tree --stdin" shows differences,\r
either in machine-readable form (without <em>-p</em>) or in patch\r
- form (with <em>-p</em>). This output can be supressed. It is\r
+ form (with <em>-p</em>). This output can be suppressed. It is\r
only useful with <em>-v</em> flag.\r
</p>\r
</dd>\r
applicable. This flag suppressed the commit ID output.\r
</p>\r
</dd>\r
+<dt>\r
+-c\r
+</dt>\r
+<dd>\r
+<p>\r
+ This flag changes the way a merge commit is displayed\r
+ (which means it is useful only when the command is given\r
+ one <tree-ish>, or <em>--stdin</em>). It shows the differences\r
+ from each of the parents to the merge result simultaneously\r
+ instead of showing pairwise diff between a parent and the\r
+ result one at a time (which is what the <em>-m</em> option does).\r
+ Furthermore, it lists only files which were modified\r
+ from all parents.\r
+</p>\r
+</dd>\r
+<dt>\r
+--cc\r
+</dt>\r
+<dd>\r
+<p>\r
+ This flag changes the way a merge commit patch is displayed,\r
+ in a similar way to the <em>-c</em> option. It implies the <em>-c</em>\r
+ and <em>-p</em> options and further compresses the patch output\r
+ by omitting hunks that show differences from only one\r
+ parent, or show the same change from all but one parent\r
+ for an Octopus merge. When this optimization makes all\r
+ hunks disappear, the commit itself and the commit log\r
+ message is not shown, just like in any other "empty diff" case.\r
+</p>\r
+</dd>\r
+<dt>\r
+--always\r
+</dt>\r
+<dd>\r
+<p>\r
+ Show the commit itself and the commit log message even\r
+ if the diff itself is empty.\r
+</p>\r
+</dd>\r
</dl>\r
</div>\r
<h2>Limiting Output</h2>\r
<ol>\r
<li>\r
<p>\r
-It is preceeded with a "git diff" header, that looks like\r
+It is preceded with a "git diff" header, that looks like\r
this:\r
</p>\r
<div class="literalblock">\r
</li>\r
</ol>\r
</div>\r
+<h2>combined diff format</h2>\r
+<div class="sectionbody">\r
+<p>git-diff-tree and git-diff-files can take <em>-c</em> or <em>--cc</em> option\r
+to produce <em>combined diff</em>, which looks like this:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>diff --combined describe.c\r
+@@@ +98,7 @@@\r
+ return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;\r
+ }\r
+\r
+- static void describe(char *arg)\r
+ -static void describe(struct commit *cmit, int last_one)\r
+++static void describe(char *arg, int last_one)\r
+ {\r
+ + unsigned char sha1[20];\r
+ + struct commit *cmit;</tt></pre>\r
+</div></div>\r
+<p>Unlike the traditional <em>unified</em> diff format, which shows two\r
+files A and B with a single column that has <tt>-</tt> (minus —\r
+appears in A but removed in B), <tt>+</tt> (plus — missing in A but\r
+added to B), or <tt> </tt> (space — unchanged) prefix, this format\r
+compares two or more files file1, file2,… with one file X, and\r
+shows how X differs from each of fileN. One column for each of\r
+fileN is prepended to the output line to note how X's line is\r
+different from it.</p>\r
+<p>A <tt>-</tt> character in the column N means that the line appears in\r
+fileN but it does not appear in the last file. A <tt>+</tt> character\r
+in the column N means that the line appears in the last file,\r
+and fileN does not have that line.</p>\r
+<p>In the above example output, the function signature was changed\r
+from both files (hence two <tt>-</tt> removals from both file1 and\r
+file2, plus <tt>++</tt> to mean one line that was added does not appear\r
+in either file1 nor file2). Also two other lines are the same\r
+from file1 but do not appear in file2 (hence prefixed with <tt> +</tt>).</p>\r
+<p>When shown by <tt>git diff-tree -c</tt>, it compares the parents of a\r
+merge commit with the merge result (i.e. file1..fileN are the\r
+parents). When shown by <tt>git diff-files -c</tt>, it compares the\r
+two unresolved merge parents with the working tree file\r
+(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka\r
+"their version").</p>\r
+</div>\r
<h2>Author</h2>\r
<div class="sectionbody">\r
<p>Written by Linus Torvalds <torvalds@osdl.org></p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 27-Dec-2005 00:16:04 PDT\r
+Last updated 17-May-2006 10:34:02 UTC\r
</div>\r
</div>\r
</body>\r