summaryrefslogtreecommitdiff
path: root/xdiff/xdiffi.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-19 23:36:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-19 23:36:55 (GMT)
commit307ab20b333d9b4c818b1ff912e86944d1a3fdc1 (patch)
treef12359319e8af782f8c2f31ca811643ec38213f0 /xdiff/xdiffi.c
parente5b06629de847663aaf0f7daae8de81338da3901 (diff)
downloadgit-307ab20b333d9b4c818b1ff912e86944d1a3fdc1.zip
git-307ab20b333d9b4c818b1ff912e86944d1a3fdc1.tar.gz
git-307ab20b333d9b4c818b1ff912e86944d1a3fdc1.tar.bz2
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 <gitster@pobox.com>
Diffstat (limited to 'xdiff/xdiffi.c')
-rw-r--r--xdiff/xdiffi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c
index 75a3922..bc889e8 100644
--- a/xdiff/xdiffi.c
+++ b/xdiff/xdiffi.c
@@ -328,10 +328,10 @@ int xdl_do_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
xdalgoenv_t xenv;
diffdata_t dd1, dd2;
- if (xpp->flags & XDF_PATIENCE_DIFF)
+ if (XDF_DIFF_ALG(xpp->flags) == XDF_PATIENCE_DIFF)
return xdl_do_patience_diff(mf1, mf2, xpp, xe);
- if (xpp->flags & XDF_HISTOGRAM_DIFF)
+ if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF)
return xdl_do_histogram_diff(mf1, mf2, xpp, xe);
if (xdl_prepare_env(mf1, mf2, xpp, xe) < 0) {