{"thread":{"id":"10539","subject":"[PATCH] git-diff.txt: add section \"output format\" describing the diff formats","startedAt":"2007-10-31T13:59:16Z","lastAt":"2007-11-01T06:33:59Z","messageCount":2,"participants":["Gerrit Pape","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"57695","messageId":"20071031135916.5625.qmail@134c5e95d8ec4d.315fe32.mid.smarden.org","threadId":"10539","inReplyTo":null,"subject":"[PATCH] git-diff.txt: add section \"output format\" describing the diff formats","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-10-31T13:59:16Z","receivedAt":"2007-10-31T13:59:16Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"git-diff.txt includes diff-options.txt which for the -p option refers\nto a section \"generating patches..\" which is missing from the git-diff\ndocumentation.  This patch adapts diff-format.txt to additionally\nmention the git-diff program, and includes diff-format.txt into\ngit-diff.txt.\n\nTino Keitel noticed this problem.\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n Documentation/diff-format.txt |   22 +++++++++++-----------\n Documentation/git-diff.txt    |    3 +++\n 2 files changed, 14 insertions(+), 11 deletions(-)\n\ndiff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt\nindex 0015032..a580f18 100644\n--- a/Documentation/diff-format.txt\n+++ b/Documentation/diff-format.txt\n@@ -1,5 +1,5 @@\n-The output format from \"git-diff-index\", \"git-diff-tree\" and\n-\"git-diff-files\" are very similar.\n+The output format from \"git-diff-index\", \"git-diff-tree\",\n+\"git-diff-files\" and \"git diff --raw\" are very similar.\n \n These commands all compare two sets of things; what is\n compared differs:\n@@ -62,9 +62,9 @@ respectively.\n diff format for merges\n ----------------------\n \n-\"git-diff-tree\" and \"git-diff-files\" can take '-c' or '--cc' option\n-to generate diff output also for merge commits.  The output differs\n-from the format described above in the following way:\n+\"git-diff-tree\", \"git-diff-files\" and \"git-diff\" can take '-c' or\n+'--cc' option to generate diff output also for merge commits.  The\n+output differs from the format described above in the following way:\n \n . there is a colon for each parent\n . there are more \"src\" modes and \"src\" sha1\n@@ -86,10 +86,10 @@ Generating patches with -p\n --------------------------\n \n When \"git-diff-index\", \"git-diff-tree\", or \"git-diff-files\" are run\n-with a '-p' option, they do not produce the output described above;\n-instead they produce a patch file.  You can customize the creation\n-of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS\n-environment variables.\n+with a '-p' option, or \"git diff\" without the '--raw' option, they\n+do not produce the output described above; instead they produce a\n+patch file.  You can customize the creation of such patches via the\n+GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.\n \n What the -p option produces is slightly different from the traditional\n diff format.\n@@ -137,8 +137,8 @@ file made it into the new one.\n combined diff format\n --------------------\n \n-git-diff-tree and git-diff-files can take '-c' or '--cc' option\n-to produce 'combined diff', which looks like this:\n+\"git-diff-tree\", \"git-diff-files\" and \"git-diff\" can take '-c' or\n+'--cc' option to produce 'combined diff', which looks like this:\n \n ------------\n diff --combined describe.c\ndiff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt\nindex ce0f502..11c4216 100644\n--- a/Documentation/git-diff.txt\n+++ b/Documentation/git-diff.txt\n@@ -82,6 +82,9 @@ include::diff-options.txt[]\n \tthe diff to the named paths (you can give directory\n \tnames and get diff for all files under them).\n \n+Output format\n+-------------\n+include::diff-format.txt[]\n \n EXAMPLES\n --------\n-- \n1.5.3.4\n"},{"id":"57786","messageId":"7vir4mcw4o.fsf@gitster.siamese.dyndns.org","threadId":"10539","inReplyTo":"20071031135916.5625.qmail@134c5e95d8ec4d.315fe32.mid.smarden.org","subject":"Re: [PATCH] git-diff.txt: add section \"output format\" describing the diff formats","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-01T06:33:59Z","receivedAt":"2007-11-01T06:33:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Gerrit Pape <pape@smarden.org> writes:\n\n> diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt\n> index 0015032..a580f18 100644\n> --- a/Documentation/diff-format.txt\n> +++ b/Documentation/diff-format.txt\n> @@ -1,5 +1,5 @@\n> -The output format from \"git-diff-index\", \"git-diff-tree\" and\n> -\"git-diff-files\" are very similar.\n> +The output format from \"git-diff-index\", \"git-diff-tree\",\n> +\"git-diff-files\" and \"git diff --raw\" are very similar.\n\nI like this attention to the detail of mentioning \"--raw\".\n\n> @@ -62,9 +62,9 @@ respectively.\n>  diff format for merges\n>  ----------------------\n>  \n> -\"git-diff-tree\" and \"git-diff-files\" can take '-c' or '--cc' option\n> -to generate diff output also for merge commits.  The output differs\n> -from the format described above in the following way:\n> +\"git-diff-tree\", \"git-diff-files\" and \"git-diff\" can take '-c' or\n> +'--cc' option to generate diff output also for merge commits.  The\n> +output differs from the format described above in the following way:\n\n... and this part should do so, too. \n"}]}