diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 0f07c9c4a86df8ac2d7ab2f99e31226e395b63ab..3d2b9d0a06f38c42c0df927fa03a053fa1b45277 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -168,5 +168,13 @@ --quiet:: Disable all output of the program. Implies --exit-code. +--ext-diff:: + Allow an external diff helper to be executed. If you set an + external diff driver with gitlink:gitattributes(5), you need + to use this option with gitlink:git-log(1) and friends. + +--no-ext-diff:: + Disallow external diff drivers. + For more detailed explanation on these common options, see also link:diffcore.html[diffcore documentation]. diff --git a/diff.c b/diff.c index 93eca79c1762e697d57ccd8c49b2f7994f722c89..b6eb72be029c9cd2f2b33977f3a3f02099b68106 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;