All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git-diff.txt: add section "output format" describing the diff formats
@ 2007-10-31 13:59 Gerrit Pape
  2007-11-01  6:33 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Pape @ 2007-10-31 13:59 UTC (permalink / raw
  To: git, Junio C Hamano

git-diff.txt includes diff-options.txt which for the -p option refers
to a section "generating patches.." which is missing from the git-diff
documentation.  This patch adapts diff-format.txt to additionally
mention the git-diff program, and includes diff-format.txt into
git-diff.txt.

Tino Keitel noticed this problem.

Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 Documentation/diff-format.txt |   22 +++++++++++-----------
 Documentation/git-diff.txt    |    3 +++
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
index 0015032..a580f18 100644
--- a/Documentation/diff-format.txt
+++ b/Documentation/diff-format.txt
@@ -1,5 +1,5 @@
-The output format from "git-diff-index", "git-diff-tree" and
-"git-diff-files" are very similar.
+The output format from "git-diff-index", "git-diff-tree",
+"git-diff-files" and "git diff --raw" are very similar.
 
 These commands all compare two sets of things; what is
 compared differs:
@@ -62,9 +62,9 @@ respectively.
 diff format for merges
 ----------------------
 
-"git-diff-tree" and "git-diff-files" can take '-c' or '--cc' option
-to generate diff output also for merge commits.  The output differs
-from the format described above in the following way:
+"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
+'--cc' option to generate diff output also for merge commits.  The
+output differs from the format described above in the following way:
 
 . there is a colon for each parent
 . there are more "src" modes and "src" sha1
@@ -86,10 +86,10 @@ Generating patches with -p
 --------------------------
 
 When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
-with a '-p' option, they do not produce the output described above;
-instead they produce a patch file.  You can customize the creation
-of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS
-environment variables.
+with a '-p' option, or "git diff" without the '--raw' option, they
+do not produce the output described above; instead they produce a
+patch file.  You can customize the creation of such patches via the
+GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.
 
 What the -p option produces is slightly different from the traditional
 diff format.
@@ -137,8 +137,8 @@ file made it into the new one.
 combined diff format
 --------------------
 
-git-diff-tree and git-diff-files can take '-c' or '--cc' option
-to produce 'combined diff', which looks like this:
+"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
+'--cc' option to produce 'combined diff', which looks like this:
 
 ------------
 diff --combined describe.c
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index ce0f502..11c4216 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -82,6 +82,9 @@ include::diff-options.txt[]
 	the diff to the named paths (you can give directory
 	names and get diff for all files under them).
 
+Output format
+-------------
+include::diff-format.txt[]
 
 EXAMPLES
 --------
-- 
1.5.3.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] git-diff.txt: add section "output format" describing the diff formats
  2007-10-31 13:59 [PATCH] git-diff.txt: add section "output format" describing the diff formats Gerrit Pape
@ 2007-11-01  6:33 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2007-11-01  6:33 UTC (permalink / raw
  To: Gerrit Pape; +Cc: git

Gerrit Pape <pape@smarden.org> writes:

> diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
> index 0015032..a580f18 100644
> --- a/Documentation/diff-format.txt
> +++ b/Documentation/diff-format.txt
> @@ -1,5 +1,5 @@
> -The output format from "git-diff-index", "git-diff-tree" and
> -"git-diff-files" are very similar.
> +The output format from "git-diff-index", "git-diff-tree",
> +"git-diff-files" and "git diff --raw" are very similar.

I like this attention to the detail of mentioning "--raw".

> @@ -62,9 +62,9 @@ respectively.
>  diff format for merges
>  ----------------------
>  
> -"git-diff-tree" and "git-diff-files" can take '-c' or '--cc' option
> -to generate diff output also for merge commits.  The output differs
> -from the format described above in the following way:
> +"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
> +'--cc' option to generate diff output also for merge commits.  The
> +output differs from the format described above in the following way:

... and this part should do so, too. 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-01  6:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 13:59 [PATCH] git-diff.txt: add section "output format" describing the diff formats Gerrit Pape
2007-11-01  6:33 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.