aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-06-30 18:47:07 +0100
committerJunio C Hamano <gitster@pobox.com>2007-07-03 19:05:55 -0700
commit72909befaa043fcc975115bb56d25a6e7dc65fb6 (patch)
tree6c0373991554e7fe72e9ec201be3a707ddb67e24 /diff.c
parentc401b33c349beaf4c218c6441c3e2b58a958de6f (diff)
downloadgit-72909befaa043fcc975115bb56d25a6e7dc65fb6.tar.gz
git-72909befaa043fcc975115bb56d25a6e7dc65fb6.tar.xz
Add diff-option --ext-diff
To prevent funky games with external diff engines, git-log and friends prevent external diff engines from being called. That makes sense in the context of git-format-patch or git-rebase. However, for "git log -p" it is not so nice to get the message that binary files cannot be compared, while "git diff" has no problems with them, if you provided an external diff driver. With this patch, "git log --ext-diff -p" will do what you expect, and the option "--no-ext-diff" can be used to override that setting. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index 93eca79c1..b6eb72be0 100644
--- a/diff.c
+++ b/diff.c
@@ -2241,6 +2241,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
options->exit_with_status = 1;
else if (!strcmp(arg, "--quiet"))
options->quiet = 1;
+ else if (!strcmp(arg, "--ext-diff"))
+ options->allow_external = 1;
+ else if (!strcmp(arg, "--no-ext-diff"))
+ options->allow_external = 0;
else
return 0;
return 1;