<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
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
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,--cc\r
+</dt>\r
+<dd>\r
+<p>\r
+ These flags change 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\r
+ simultaneously, instead of showing pairwise diff between\r
+ a parent and the result one at a time, which <em>-m</em> option\r
+ output does. <em>--cc</em> further compresses the output by\r
+ omiting 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 any other "empty diff" cases.\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 08-Feb-2006 00:52:29 UTC\r
</div>\r
</div>\r
</body>\r