aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-23 00:21:02 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-23 00:21:02 -0700
commit2cc3167c688d1c91bc4cb9b1caa737b9d4971056 (patch)
treec11a4104688ea0690ae39434e6c48addd38cc2a1
parent4280cde95fa4e3fb012eb6d0c239a7777baaf60c (diff)
downloadgit-2cc3167c688d1c91bc4cb9b1caa737b9d4971056.tar.gz
git-2cc3167c688d1c91bc4cb9b1caa737b9d4971056.tar.xz
Document "diff=driver" attribute
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Documentation/gitattributes.txt32
1 files changed, 29 insertions, 3 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 126871756..d2edb9b14 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -151,8 +151,34 @@ Unspecified::
text, it is treated as text. Otherwise it would
generate `Binary files differ`.
-Any other value set to `diff` attribute is ignored and git acts
-as if the attribute is left unspecified.
+String::
+
+ Diff is shown using the specified custom diff driver.
+ The driver program is given its input using the same
+ calling convention as used for GIT_EXTERNAL_DIFF
+ program.
+
+
+Defining a custom diff driver
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The definition of a diff driver is done in `gitconfig`, not
+`gitattributes` file, so strictly speaking this manual page is a
+wrong place to talk about it. However...
+
+To define a custom diff driver `jcdiff`, add a section to your
+`$GIT_DIR/config` file (or `$HOME/.gitconfig` file) like this:
+
+----------------------------------------------------------------
+[diff "jcdiff"]
+ command = j-c-diff
+----------------------------------------------------------------
+
+When git needs to show you a diff for the path with `diff`
+attribute set to `jcdiff`, it calls the command you specified
+with the above configuration, i.e. `j-c-diff`, with 7
+parameters, just like `GIT_EXTERNAL_DIFF` program is called.
+See gitlink:git[7] for details.
Performing a three-way merge
@@ -183,7 +209,7 @@ Unspecified::
different merge driver to be used for paths to which the
`merge` attribute is unspecified.
-Any other string value::
+String::
3-way merge is performed using the specified custom
merge driver. The built-in 3-way merge driver can be