{"thread":{"id":"43470","subject":"[PATCH] Update documentation to remove incorrect GIT_DIFF_OPTS example.","startedAt":"2006-11-27T19:37:43Z","lastAt":"2006-11-27T19:37:43Z","messageCount":1,"participants":["Sean"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"294969","messageId":"BAYC1-PASMTP10903FA2C4B5C1F99E1322AEE60@CEZ.ICE","threadId":"43470","inReplyTo":null,"subject":"[PATCH] Update documentation to remove incorrect GIT_DIFF_OPTS example.","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-11-27T19:37:43Z","receivedAt":"2006-11-27T19:37:43Z","isPatch":true,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"Git no longer calls an external diff program to generate patches.\nRemove the documentation which suggests that you can pass\narbitrary diff options via the GIT_DIFF_OPTS environment variable.\n\nSigned-off-by: Sean Estabrooks <seanlkml@sympatico.ca>\n---\n Documentation/diff-format.txt |   57 ++++------------------------------------\n Documentation/git.txt         |   32 ++++++++++++++++++++---\n 2 files changed, 34 insertions(+), 55 deletions(-)\n\ndiff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt\nindex e4520e2..883c1bb 100644\n--- a/Documentation/diff-format.txt\n+++ b/Documentation/diff-format.txt\n@@ -65,62 +65,17 @@ Generating patches with -p\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.\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 \n-The patch generation can be customized at two levels.\n-\n-1. When the environment variable 'GIT_EXTERNAL_DIFF' is not set,\n-   these commands internally invoke \"diff\" like this:\n-\n-      diff -L a/<path> -L b/<path> -pu <old> <new>\n-+\n-For added files, `/dev/null` is used for <old>.  For removed\n-files, `/dev/null` is used for <new>\n-+\n-The \"diff\" formatting options can be customized via the\n-environment variable 'GIT_DIFF_OPTS'.  For example, if you\n-prefer context diff:\n-\n-      GIT_DIFF_OPTS=-c git-diff-index -p HEAD\n-\n-\n-2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the\n-   program named by it is called, instead of the diff invocation\n-   described above.\n-+\n-For a path that is added, removed, or modified,\n-'GIT_EXTERNAL_DIFF' is called with 7 parameters:\n-\n-     path old-file old-hex old-mode new-file new-hex new-mode\n-+\n-where:\n-\n-     <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the\n-\t\t      contents of <old|new>,\n-     <old|new>-hex:: are the 40-hexdigit SHA1 hashes,\n-     <old|new>-mode:: are the octal representation of the file modes.\n-\n-+ \n-The file parameters can point at the user's working file\n-(e.g. `new-file` in \"git-diff-files\"), `/dev/null` (e.g. `old-file`\n-when a new file is added), or a temporary file (e.g. `old-file` in the\n-index).  'GIT_EXTERNAL_DIFF' should not worry about unlinking the\n-temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.\n-\n-For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1\n-parameter, <path>.\n-\n-\n-git specific extension to diff format\n--------------------------------------\n-\n-What -p option produces is slightly different from the\n-traditional diff format.\n+What the -p option produces is slightly different from the traditional\n+diff format.\n \n 1.   It is preceded with a \"git diff\" header, that looks like\n      this:\n \n-     diff --git a/file1 b/file2\n+       diff --git a/file1 b/file2\n +\n The `a/` and `b/` filenames are the same unless rename/copy is\n involved.  Especially, even for a creation or a deletion,\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 619d656..6382ef0 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -639,11 +639,35 @@ git Commits\n git Diffs\n ~~~~~~~~~\n 'GIT_DIFF_OPTS'::\n+\tOnly valid setting is \"--unified=??\" or \"-u??\" to set the\n+\tnumber of context lines shown when a unified diff is created.\n+\tThis takes precedence over any \"-U\" or \"--unified\" option\n+\tvalue passed on the git diff command line.\n+\n 'GIT_EXTERNAL_DIFF'::\n-\tsee the \"generating patches\" section in :\n-\tgitlink:git-diff-index[1];\n-\tgitlink:git-diff-files[1];\n-\tgitlink:git-diff-tree[1]\n+\tWhen the environment variable 'GIT_EXTERNAL_DIFF' is set, the\n+\tprogram named by it is called, instead of the diff invocation\n+\tdescribed above.  For a path that is added, removed, or modified,\n+        'GIT_EXTERNAL_DIFF' is called with 7 parameters:\n+\n+\tpath old-file old-hex old-mode new-file new-hex new-mode\n++\n+where:\n+\n+\t<old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the\n+                         contents of <old|new>,\n+\t<old|new>-hex:: are the 40-hexdigit SHA1 hashes,\n+\t<old|new>-mode:: are the octal representation of the file modes.\n+\n++\n+The file parameters can point at the user's working file\n+(e.g. `new-file` in \"git-diff-files\"), `/dev/null` (e.g. `old-file`\n+when a new file is added), or a temporary file (e.g. `old-file` in the\n+index).  'GIT_EXTERNAL_DIFF' should not worry about unlinking the\n+temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.\n++\n+For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1\n+parameter, <path>.\n \n other\n ~~~~~\n-- \n1.4.4.1\n"}]}