summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2024-06-24 21:15:45 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-24 13:49:41 -0700
commit0f4b0d4cf0e192b770529b97712f31dcf365e118 (patch)
tree62e707ce92eda719d811bab1467ddd8c5f415bce /diff.c
parent786a3e4b8d754d2b14b1208b98eeb0a554ef19a8 (diff)
diff: allow --color-moved with --no-ext-diff
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 <gitster@pobox.com> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c3
1 files changed, 2 insertions, 1 deletions
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) {