From: Junio C Hamano Date: Sat, 28 Jan 2006 10:38:19 +0000 (-0800) Subject: Autogenerated HTML docs for v1.1.5-g3480 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=fb56a964f2f60e657c136ccbf316f127d6d21c36 Autogenerated HTML docs for v1.1.5-g3480 --- diff --git a/diff-format.txt b/diff-format.txt index 0398b408..617d8f52 100644 --- a/diff-format.txt +++ b/diff-format.txt @@ -146,3 +146,52 @@ the file that rename/copy produces, respectively. 3. TAB, LF, and backslash characters in pathnames are represented as `\t`, `\n`, and `\\`, respectively. + + +combined diff format +-------------------- + +git-diff-tree and git-diff-files can take '-c' or '--cc' option +to produce 'combined diff', which looks like this: + +------------ +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"). + diff --git a/git-diff-files.html b/git-diff-files.html index 6eea3ada..031aa99a 100644 --- a/git-diff-files.html +++ b/git-diff-files.html @@ -272,7 +272,7 @@ git-diff-files(1) Manual Page

SYNOPSIS

-

git-diff-files [-q] [<common diff options>] [<path>…]

+

git-diff-files [-q] [-0|-1|-2|-3|-c|--cc] [<common diff options>] [<path>…]

DESCRIPTION

@@ -450,6 +450,17 @@ cleanly resolved paths. The option -0 can be given to omit diff output for unmerged entries and just show "Unmerged".

+-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. +

+
+
-q
@@ -722,6 +733,48 @@ TAB, LF, and backslash characters in pathnames are
+

combined diff format

+
+

git-diff-tree and git-diff-files can take -c or --cc option +to produce combined diff, which looks like this:

+
+
+
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").

+

Author

Written by Linus Torvalds <torvalds@osdl.org>

@@ -736,7 +789,7 @@ TAB, LF, and backslash characters in pathnames are
diff --git a/git-diff-files.txt b/git-diff-files.txt index 67f51265..481b8b3a 100644 --- a/git-diff-files.txt +++ b/git-diff-files.txt @@ -8,7 +8,7 @@ git-diff-files - Compares files in the working tree and the index SYNOPSIS -------- -'git-diff-files' [-q] [] [...] +'git-diff-files' [-q] [-0|-1|-2|-3|-c|--cc] [] [...] DESCRIPTION ----------- @@ -30,6 +30,12 @@ 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". +-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. + -q:: Remain silent even on nonexisting files diff --git a/git-diff-index.html b/git-diff-index.html index 968e3ae5..97b1fd83 100644 --- a/git-diff-index.html +++ b/git-diff-index.html @@ -729,6 +729,48 @@ TAB, LF, and backslash characters in pathnames are +

combined diff format

+
+

git-diff-tree and git-diff-files can take -c or --cc option +to produce combined diff, which looks like this:

+
+
+
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").

+

Operating Modes

You can choose whether you want to trust the index file entirely @@ -837,7 +879,7 @@ always have the special all-zero sha1.

diff --git a/git-diff-stages.html b/git-diff-stages.html index faf54731..11b351df 100644 --- a/git-diff-stages.html +++ b/git-diff-stages.html @@ -707,6 +707,48 @@ TAB, LF, and backslash characters in pathnames are +

combined diff format

+
+

git-diff-tree and git-diff-files can take -c or --cc option +to produce combined diff, which looks like this:

+
+
+
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").

+

Author

Written by Junio C Hamano <junkio@cox.net>

@@ -721,7 +763,7 @@ TAB, LF, and backslash characters in pathnames are
diff --git a/git-diff-tree.html b/git-diff-tree.html index 64dcd230..036370e5 100644 --- a/git-diff-tree.html +++ b/git-diff-tree.html @@ -273,8 +273,9 @@ git-diff-tree(1) Manual Page

SYNOPSIS

-
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>…]

DESCRIPTION

@@ -547,6 +548,25 @@ separated with a single space are given.

applicable. This flag suppressed the commit ID output.

+
+-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. +

+

Limiting Output

@@ -854,6 +874,48 @@ TAB, LF, and backslash characters in pathnames are +

combined diff format

+
+

git-diff-tree and git-diff-files can take -c or --cc option +to produce combined diff, which looks like this:

+
+
+
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").

+

Author

Written by Linus Torvalds <torvalds@osdl.org>

@@ -868,7 +930,7 @@ TAB, LF, and backslash characters in pathnames are
diff --git a/git-diff-tree.txt b/git-diff-tree.txt index 91fb1304..dd46d4f0 100644 --- a/git-diff-tree.txt +++ b/git-diff-tree.txt @@ -9,8 +9,9 @@ git-diff-tree - Compares the content and mode of blobs found via two tree object SYNOPSIS -------- [verse] -'git-diff-tree' [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty] [-t] [-r] - [--root] [] [] [...] +'git-diff-tree' [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty] + [-t] [-r] [-c | --cc] [--root] [] + [] [...] DESCRIPTION ----------- @@ -80,6 +81,20 @@ separated with a single space are given. git-diff-tree outputs a line with the commit ID when applicable. This flag suppressed the commit ID output. +-c,--cc:: + These flags change the way a merge commit is displayed + (which means it is useful only when the command is given + one , 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. + Limiting Output ---------------