From bd7255c992b6e0423246d15936981c45e3813a99 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Thu, 6 Nov 2025 22:41:53 +0000 Subject: xdiff: add 'minimal' to XDF_DIFF_ALGORITHM_MASK The XDF_DIFF_ALGORITHM_MASK bit mask only includes bits for the patience and histogram diffs, not for the minimal one. This means that when reseting the diff algorithm to the default one, one needs to separately clear the bit for the minimal diff. There are places in the code that fail to do that: merge-ort.c and builtin/merge-file.c. Add the XDF_NEED_MINIMAL bit to the bit mask, and remove the separate clearing of this bit in the places where it hasn't been forgotten. Signed-off-by: Antonin Delpeuch Signed-off-by: Junio C Hamano --- diff.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'diff.c') diff --git a/diff.c b/diff.c index a74e701806..f0a0cecc76 100644 --- a/diff.c +++ b/diff.c @@ -3526,8 +3526,6 @@ static int set_diff_algorithm(struct diff_options *opts, if (value < 0) return -1; - /* clear out previous settings */ - DIFF_XDL_CLR(opts, NEED_MINIMAL); opts->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK; opts->xdl_opts |= value; -- cgit v1.2.3