summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-24 03:56:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-24 03:56:03 (GMT)
commit7ccb9459736e9cfcc543229a4ac3e7039e2d54e3 (patch)
tree25851cbb02b1a08558ce5763cee4617939f7bfb7 /diff.c
parenta7fe78a8953a1c4d8abcb36f28133078a778b8d2 (diff)
parentc12f82ae631eb07d0ee6a61003754d103025a0b3 (diff)
downloadgit-7ccb9459736e9cfcc543229a4ac3e7039e2d54e3.zip
git-7ccb9459736e9cfcc543229a4ac3e7039e2d54e3.tar.gz
git-7ccb9459736e9cfcc543229a4ac3e7039e2d54e3.tar.bz2
Merge branch 'jv/maint-no-ext-diff'
"git diff --no-ext-diff" did not output anything for a typechange filepair when GIT_EXTERNAL_DIFF is in effect. * jv/maint-no-ext-diff: diff: test precedence of external diff drivers diff: correctly disable external_diff with --no-ext-diff
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 208096f..62cbe14 100644
--- a/diff.c
+++ b/diff.c
@@ -2992,9 +2992,8 @@ static void run_diff_cmd(const char *pgm,
int complete_rewrite = (p->status == DIFF_STATUS_MODIFIED) && p->score;
int must_show_header = 0;
- if (!DIFF_OPT_TST(o, ALLOW_EXTERNAL))
- pgm = NULL;
- else {
+
+ if (DIFF_OPT_TST(o, ALLOW_EXTERNAL)) {
struct userdiff_driver *drv = userdiff_find_by_path(attr_path);
if (drv && drv->external)
pgm = drv->external;
@@ -3074,6 +3073,9 @@ static void run_diff(struct diff_filepair *p, struct diff_options *o)
if (o->prefix_length)
strip_prefix(o->prefix_length, &name, &other);
+ if (!DIFF_OPT_TST(o, ALLOW_EXTERNAL))
+ pgm = NULL;
+
if (DIFF_PAIR_UNMERGED(p)) {
run_diff_cmd(pgm, name, NULL, attr_path,
NULL, NULL, NULL, o, p);