diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-22 17:52:55 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-22 22:16:14 -0700 |
commit | f1af60bdba465779df92090ed370988f202ff043 (patch) | |
tree | c601842acbc36c310701f6e3f00d79364e42da86 /builtin-diff.c | |
parent | d83c9af5c6a437ddaa9dd2747e83aee642501a44 (diff) | |
download | git-f1af60bdba465779df92090ed370988f202ff043.tar.gz |
Support 'diff=pgm' attribute
This enhances the attributes mechanism so that external programs
meant for existing GIT_EXTERNAL_DIFF interface can be specifed
per path.
To configure such a custom diff driver, first define a custom
diff driver in the configuration:
[diff "my-c-diff"]
command = <<your command string comes here>>
Then mark the paths that you want to use this custom driver
using the attribute mechanism.
*.c diff=my-c-diff
The intent of this separation is that the attribute mechanism is
used for specifying the type of the contents, while the
configuration mechanism is used to define what needs to be done
to that type of the contents, which would be specific to both
platform and personal taste.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-diff.c')
-rw-r--r-- | builtin-diff.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-diff.c b/builtin-diff.c index 21d13f0b30..2ae60097b8 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -225,6 +225,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix) if (diff_setup_done(&rev.diffopt) < 0) die("diff_setup_done failed"); } + rev.diffopt.allow_external = 1; /* Do we have --cached and not have a pending object, then * default to HEAD by hand. Eek. |