Merge branch 'jv/maint-no-ext-diff' into maint
"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
This commit is contained in:
8
diff.c
8
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);
|
||||
|
||||
Reference in New Issue
Block a user