Autogenerated man pages for v1.1.5-g3480
authorJunio C Hamano <junio@hera.kernel.org>
Sat, 28 Jan 2006 10:38:47 +0000 (02:38 -0800)
committerJunio C Hamano <junio@hera.kernel.org>
Sat, 28 Jan 2006 10:38:47 +0000 (02:38 -0800)
man1/git-diff-files.1
man1/git-diff-index.1
man1/git-diff-stages.1
man1/git-diff-tree.1

index 275d4bd..8a13453 100755 (executable)
@@ -23,7 +23,7 @@ git-diff-files \- Compares files in the working tree and the index
 .SH "SYNOPSIS"
 
 
-git\-diff\-files [\-q] [<common diff options>] [<path>...]
+git\-diff\-files [\-q] [\-0|\-1|\-2|\-3|\-c|\-\-cc] [<common diff options>] [<path>...]
 
 .SH "DESCRIPTION"
 
@@ -106,6 +106,10 @@ Diff against the "base" version, "our branch" or "their branch" respectively\&.
 The default is to diff against our branch (\-2) and the cleanly resolved paths\&. The option \-0 can be given to omit diff output for unmerged entries and just show "Unmerged"\&.
 
 .TP
+\-c,\-\-cc
+This compares stage 2 (our branch), stage 3 (their branch) and the working tree file and outputs a combined diff, similar to the way diff\-tree shows a merge commit with these flags\&.
+
+.TP
 \-q
 Remain silent even on nonexisting files
 
@@ -289,6 +293,35 @@ index <hash>\&.\&.<hash> <mode>
 TAB, LF, and backslash characters in pathnames are represented as \\t, \\n, and \\\\, respectively\&.
 .LP
 
+.SH "COMBINED DIFF FORMAT"
+
+
+git\-diff\-tree and git\-diff\-files can take \-c or \-\-cc option to produce combined diff, which looks like this:
+
+.IP
+diff \-\-combined describe\&.c
+@@@ +98,7 @@@
+   return (a_date > b_date) ? \-1 : (a_date == b_date) ? 0 : 1;
+  }
+
+\- static void describe(char *arg)
+ \-static void describe(struct commit *cmit, int last_one)
+++static void describe(char *arg, int last_one)
+  {
+ +     unsigned char sha1[20];
+ +     struct commit *cmit;
+
+Unlike the traditional unified diff format, which shows two files A and B with a single column that has \- (minus -- appears in A but removed in B), + (plus -- missing in A but added to B), or (space -- unchanged) prefix, this format compares two or more files file1, file2,... with one file X, and shows how X differs from each of fileN\&. One column for each of fileN is prepended to the output line to note how X's line is different from it\&.
+
+
+A \- character in the column N means that the line appears in fileN but it does not appear in the last file\&. A + character in the column N means that the line appears in the last file, and fileN does not have that line\&.
+
+
+In the above example output, the function signature was changed from both files (hence two \- removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2)\&. Also two other lines are the same from file1 but do not appear in file2 (hence prefixed with +)\&.
+
+
+When shown by git diff\-tree \-c, it compares the parents of a merge commit with the merge result (i\&.e\&. file1\&.\&.fileN are the parents)\&. When shown by git diff\-files \-c, it compares the two unresolved merge parents with the working tree file (i\&.e\&. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version")\&.
+
 .SH "AUTHOR"
 
 
index 7e6bf46..6a4f1ef 100755 (executable)
@@ -291,6 +291,35 @@ index <hash>\&.\&.<hash> <mode>
 TAB, LF, and backslash characters in pathnames are represented as \\t, \\n, and \\\\, respectively\&.
 .LP
 
+.SH "COMBINED DIFF FORMAT"
+
+
+git\-diff\-tree and git\-diff\-files can take \-c or \-\-cc option to produce combined diff, which looks like this:
+
+.IP
+diff \-\-combined describe\&.c
+@@@ +98,7 @@@
+   return (a_date > b_date) ? \-1 : (a_date == b_date) ? 0 : 1;
+  }
+
+\- static void describe(char *arg)
+ \-static void describe(struct commit *cmit, int last_one)
+++static void describe(char *arg, int last_one)
+  {
+ +     unsigned char sha1[20];
+ +     struct commit *cmit;
+
+Unlike the traditional unified diff format, which shows two files A and B with a single column that has \- (minus -- appears in A but removed in B), + (plus -- missing in A but added to B), or (space -- unchanged) prefix, this format compares two or more files file1, file2,... with one file X, and shows how X differs from each of fileN\&. One column for each of fileN is prepended to the output line to note how X's line is different from it\&.
+
+
+A \- character in the column N means that the line appears in fileN but it does not appear in the last file\&. A + character in the column N means that the line appears in the last file, and fileN does not have that line\&.
+
+
+In the above example output, the function signature was changed from both files (hence two \- removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2)\&. Also two other lines are the same from file1 but do not appear in file2 (hence prefixed with +)\&.
+
+
+When shown by git diff\-tree \-c, it compares the parents of a merge commit with the merge result (i\&.e\&. file1\&.\&.fileN are the parents)\&. When shown by git diff\-files \-c, it compares the two unresolved merge parents with the working tree file (i\&.e\&. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version")\&.
+
 .SH "OPERATING MODES"
 
 
index d5622bd..ac54d04 100755 (executable)
@@ -283,6 +283,35 @@ index <hash>\&.\&.<hash> <mode>
 TAB, LF, and backslash characters in pathnames are represented as \\t, \\n, and \\\\, respectively\&.
 .LP
 
+.SH "COMBINED DIFF FORMAT"
+
+
+git\-diff\-tree and git\-diff\-files can take \-c or \-\-cc option to produce combined diff, which looks like this:
+
+.IP
+diff \-\-combined describe\&.c
+@@@ +98,7 @@@
+   return (a_date > b_date) ? \-1 : (a_date == b_date) ? 0 : 1;
+  }
+
+\- static void describe(char *arg)
+ \-static void describe(struct commit *cmit, int last_one)
+++static void describe(char *arg, int last_one)
+  {
+ +     unsigned char sha1[20];
+ +     struct commit *cmit;
+
+Unlike the traditional unified diff format, which shows two files A and B with a single column that has \- (minus -- appears in A but removed in B), + (plus -- missing in A but added to B), or (space -- unchanged) prefix, this format compares two or more files file1, file2,... with one file X, and shows how X differs from each of fileN\&. One column for each of fileN is prepended to the output line to note how X's line is different from it\&.
+
+
+A \- character in the column N means that the line appears in fileN but it does not appear in the last file\&. A + character in the column N means that the line appears in the last file, and fileN does not have that line\&.
+
+
+In the above example output, the function signature was changed from both files (hence two \- removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2)\&. Also two other lines are the same from file1 but do not appear in file2 (hence prefixed with +)\&.
+
+
+When shown by git diff\-tree \-c, it compares the parents of a merge commit with the merge result (i\&.e\&. file1\&.\&.fileN are the parents)\&. When shown by git diff\-files \-c, it compares the two unresolved merge parents with the working tree file (i\&.e\&. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version")\&.
+
 .SH "AUTHOR"
 
 
index 13902b7..7620029 100755 (executable)
@@ -23,8 +23,9 @@ git-diff-tree \- Compares the content and mode of blobs found via two tree objec
 .SH "SYNOPSIS"
 
 .nf
-git\-diff\-tree [\-\-stdin] [\-m] [\-s] [\-v] [\-\-no\-commit\-id] [\-\-pretty] [\-t] [\-r]
-              [\-\-root] [<common diff options>] <tree\-ish> [<tree\-ish>] [<path>...]
+git\-diff\-tree [\-\-stdin] [\-m] [\-s] [\-v] [\-\-no\-commit\-id] [\-\-pretty]
+              [\-t] [\-r] [\-c | \-\-cc] [\-\-root] [<common diff options>]
+              <tree\-ish> [<tree\-ish>] [<path>...]
 .fi
 
 .SH "DESCRIPTION"
@@ -153,6 +154,10 @@ This is used to control "pretty printing" format of the commit message\&. Withou
 \-\-no\-commit\-id
 git\-diff\-tree outputs a line with the commit ID when applicable\&. This flag suppressed the commit ID output\&.
 
+.TP
+\-c,\-\-cc
+These flags change the way a merge commit is displayed (which means it is useful only when the command is given one <tree\-ish>, or \-\-stdin)\&. 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, which \-m option output does\&. \-\-cc further compresses the output by omiting hunks that show differences from only one parent, or show the same change from all but one parent for an Octopus merge\&. When this optimization makes all hunks disappear, the commit itself and the commit log message is not shown, unless \-m is specified\&.
+
 .SH "LIMITING OUTPUT"
 
 
@@ -383,6 +388,35 @@ index <hash>\&.\&.<hash> <mode>
 TAB, LF, and backslash characters in pathnames are represented as \\t, \\n, and \\\\, respectively\&.
 .LP
 
+.SH "COMBINED DIFF FORMAT"
+
+
+git\-diff\-tree and git\-diff\-files can take \-c or \-\-cc option to produce combined diff, which looks like this:
+
+.IP
+diff \-\-combined describe\&.c
+@@@ +98,7 @@@
+   return (a_date > b_date) ? \-1 : (a_date == b_date) ? 0 : 1;
+  }
+
+\- static void describe(char *arg)
+ \-static void describe(struct commit *cmit, int last_one)
+++static void describe(char *arg, int last_one)
+  {
+ +     unsigned char sha1[20];
+ +     struct commit *cmit;
+
+Unlike the traditional unified diff format, which shows two files A and B with a single column that has \- (minus -- appears in A but removed in B), + (plus -- missing in A but added to B), or (space -- unchanged) prefix, this format compares two or more files file1, file2,... with one file X, and shows how X differs from each of fileN\&. One column for each of fileN is prepended to the output line to note how X's line is different from it\&.
+
+
+A \- character in the column N means that the line appears in fileN but it does not appear in the last file\&. A + character in the column N means that the line appears in the last file, and fileN does not have that line\&.
+
+
+In the above example output, the function signature was changed from both files (hence two \- removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2)\&. Also two other lines are the same from file1 but do not appear in file2 (hence prefixed with +)\&.
+
+
+When shown by git diff\-tree \-c, it compares the parents of a merge commit with the merge result (i\&.e\&. file1\&.\&.fileN are the parents)\&. When shown by git diff\-files \-c, it compares the two unresolved merge parents with the working tree file (i\&.e\&. file1 is stage 2 aka "our version", file2 is stage 3 aka "their version")\&.
+
 .SH "AUTHOR"