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 --- merge-recursive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'merge-recursive.c') diff --git a/merge-recursive.c b/merge-recursive.c index cc664c39b..1d574fee8 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -2069,9 +2069,9 @@ int parse_merge_opt(struct merge_options *o, const char *s) else if (!prefixcmp(s, "subtree=")) o->subtree_shift = s + strlen("subtree="); else if (!strcmp(s, "patience")) - o->xdl_opts |= XDF_PATIENCE_DIFF; + o->xdl_opts = DIFF_WITH_ALG(o, PATIENCE_DIFF); else if (!strcmp(s, "histogram")) - o->xdl_opts |= XDF_HISTOGRAM_DIFF; + o->xdl_opts = DIFF_WITH_ALG(o, HISTOGRAM_DIFF); else if (!strcmp(s, "ignore-space-change")) o->xdl_opts |= XDF_IGNORE_WHITESPACE_CHANGE; else if (!strcmp(s, "ignore-all-space")) -- cgit v1.2.1