Autogenerated HTML docs for v1.1.5-g3480
[git.git] / git-diff-stages.html
index faf5473..11b351d 100644 (file)
@@ -707,6 +707,48 @@ TAB, LF, and backslash characters in pathnames are
 </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 &gt; 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 &#8212;\r
+appears in A but removed in B), <tt>+</tt> (plus &#8212; missing in A but\r
+added to B), or <tt> </tt> (space &#8212; unchanged) prefix, this format\r
+compares two or more files file1, file2,&#8230; 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 Junio C Hamano &lt;junkio@cox.net&gt;</p>\r
@@ -721,7 +763,7 @@ TAB, LF, and backslash characters in pathnames are
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 06-Jan-2006 17:12:22 PDT\r
+Last updated 28-Jan-2006 02:37:52 PDT\r
 </div>\r
 </div>\r
 </body>\r