From 307ab20b333d9b4c818b1ff912e86944d1a3fdc1 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 19 Feb 2012 15:36:55 -0800 Subject: xdiff: PATIENCE/HISTOGRAM are not independent option bits Because the default Myers, patience and histogram algorithms cannot be in effect at the same time, XDL_PATIENCE_DIFF and XDL_HISTOGRAM_DIFF are not independent bits. Instead of wasting one bit per algorithm, define a few macros to access the few bits they occupy and update the code that access them. Signed-off-by: Junio C Hamano --- xdiff/xhistogram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xdiff/xhistogram.c') diff --git a/xdiff/xhistogram.c b/xdiff/xhistogram.c index 18f6f997c3..bf99787c3e 100644 --- a/xdiff/xhistogram.c +++ b/xdiff/xhistogram.c @@ -252,7 +252,7 @@ static int fall_back_to_classic_diff(struct histindex *index, int line1, int count1, int line2, int count2) { xpparam_t xpp; - xpp.flags = index->xpp->flags & ~XDF_HISTOGRAM_DIFF; + xpp.flags = index->xpp->flags & ~XDF_DIFF_ALGORITHM_MASK; return xdl_fall_back_diff(index->env, &xpp, line1, count1, line2, count2); -- cgit v1.2.1