diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-02-19 15:36:55 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-02-19 15:36:55 -0800 |
commit | 307ab20b333d9b4c818b1ff912e86944d1a3fdc1 (patch) | |
tree | f12359319e8af782f8c2f31ca811643ec38213f0 /xdiff/xdiffi.c | |
parent | e5b06629de847663aaf0f7daae8de81338da3901 (diff) | |
download | git-307ab20b333d9b4c818b1ff912e86944d1a3fdc1.tar.gz |
xdiff: PATIENCE/HISTOGRAM are not independent option bitsjc/diff-algo-cleanup
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c index 75a3922750..bc889e8789 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) { |