From 0f4b0d4cf0e192b770529b97712f31dcf365e118 Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Mon, 24 Jun 2024 21:15:45 +0200 Subject: diff: allow --color-moved with --no-ext-diff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We ignore the option --color-moved if an external diff program is configured, presumably because its overhead is unnecessary in that case. Respect the option if we don't actually use the external diff, though. Reported-by: lolligerhans@gmx.de Helped-by: Junio C Hamano Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- diff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'diff.c') diff --git a/diff.c b/diff.c index 108c187577..a22d61a5c4 100644 --- a/diff.c +++ b/diff.c @@ -4926,7 +4926,8 @@ void diff_setup_done(struct diff_options *options) if (options->flags.follow_renames) diff_check_follow_pathspec(&options->pathspec, 1); - if (!options->use_color || external_diff()) + if (!options->use_color || + (options->flags.allow_external && external_diff())) options->color_moved = 0; if (options->filter_not) { -- cgit v1.2.3