From 881793c4f71c84e70af256c5721475c7c088b3f7 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Mon, 17 Nov 2025 08:04:31 +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 | 1 - 1 file changed, 1 deletion(-) (limited to 'diff.c') diff --git a/diff.c b/diff.c index a74e701806..0eec4a2fe8 100644 --- a/diff.c +++ b/diff.c @@ -3527,7 +3527,6 @@ static int set_diff_algorithm(struct diff_options *opts, 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