Autogenerated HTML docs for v1.1.6-g5a79
[git.git] / git-diff-index.html
index e1a787e..97b1fd8 100644 (file)
@@ -342,7 +342,7 @@ entries in the index are compared.</p>
 <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=&lt;n&gt;.\r
@@ -688,7 +688,7 @@ traditional diff format.</p>
 <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
@@ -729,6 +729,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>Operating Modes</h2>\r
 <div class="sectionbody">\r
 <p>You can choose whether you want to trust the index file entirely\r
@@ -745,7 +787,7 @@ of these operations are very useful indeed.</p>
 contents (the ones I'd write with a "git-write-tree")</tt></pre>\r
 </div></div>\r
 <p>For example, let's say that you have worked on your working directory, updated\r
-some files in the index and are ready to commit. You want to see eactly\r
+some files in the index and are ready to commit. You want to see exactly\r
 <strong>what</strong> you are going to commit is without having to write a new tree\r
 object and compare it that way, and to do that, you just do</p>\r
 <div class="literalblock">\r
@@ -807,7 +849,7 @@ directly rather than do an object-to-object diff.</p>
 actually look at the contents of the file at all. So maybe\r
 <tt>kernel/sched.c</tt> hasn't actually changed, and it's just that you\r
 touched it. In either case, it's a note that you need to\r
-"git-upate-index" it to make the index be in sync.</td>\r
+"git-update-index" it to make the index be in sync.</td>\r
 </tr></table>\r
 </div>\r
 <div class="admonitionblock">\r
@@ -837,7 +879,7 @@ always have the special all-zero sha1.</td>
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 27-Dec-2005 00:16:01 PDT\r
+Last updated 28-Jan-2006 02:37:49 PDT\r
 </div>\r
 </div>\r
 </body>\r