git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anders Melchiorsen <mail@cup.kalibalik.dk>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Anders Melchiorsen <mail@cup.kalibalik.dk>
Subject: [PATCH] Documentation: clarify diff.external limitations
Date: Sun, 27 Jul 2008 13:12:15 +0200	[thread overview]
Message-ID: <1217157135-25090-1-git-send-email-mail@cup.kalibalik.dk> (raw)

The diff.external examples pass a flag to gnu-diff, but that is not
actually supported.

Without the flag, diff will still complain about an extra operand
because git is passing 7 parameters to the external command.

Both of these are fixed by suggesting a diff-wrapper and pointing to
the description of the parameters passed.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
---
 Documentation/config.txt     |   10 ++++++----
 Documentation/git-config.txt |    2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 798b551..1a13abc 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -92,7 +92,7 @@ Example
 
 	# Our diff algorithm
 	[diff]
-		external = "/usr/local/bin/gnu-diff -u"
+		external = /usr/local/bin/diff-wrapper
 		renames = true
 
 	[branch "devel"]
@@ -563,9 +563,11 @@ diff.autorefreshindex::
 diff.external::
 	If this config variable is set, diff generation is not
 	performed using the internal diff machinery, but using the
-	given command.  Note: if you want to use an external diff
-	program only on a subset of your files, you might want to
-	use linkgit:gitattributes[5] instead.
+	given command.  Can be overridden with the `GIT_EXTERNAL_DIFF'
+	environment variable.  The command is called with parameters
+	as described under "git Diffs" in linkgit:git[1].  Note: if
+	you want to use an external diff program only on a subset of
+	your files, you	might want to use linkgit:gitattributes[5] instead.
 
 diff.renameLimit::
 	The number of files to consider when performing the copy/rename
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 697824c..28e1861 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -222,7 +222,7 @@ Given a .git/config like this:
 
 	; Our diff algorithm
 	[diff]
-		external = "/usr/local/bin/gnu-diff -u"
+		external = /usr/local/bin/diff-wrapper
 		renames = true
 
 	; Proxy settings
-- 
1.5.4.3

                 reply	other threads:[~2008-07-27 11:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1217157135-25090-1-git-send-email-mail@cup.kalibalik.dk \
    --to=mail@cup.kalibalik.dk \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).