summaryrefslogtreecommitdiff
path: root/diff.h
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 /diff.h
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 'diff.h')
-rw-r--r--diff.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index 0c51724..e688a48d 100644
--- a/diff.h
+++ b/diff.h
@@ -88,6 +88,8 @@ typedef struct strbuf *(*diff_prefix_fn_t)(struct diff_options *opt, void *data)
#define DIFF_XDL_SET(opts, flag) ((opts)->xdl_opts |= XDF_##flag)
#define DIFF_XDL_CLR(opts, flag) ((opts)->xdl_opts &= ~XDF_##flag)
+#define DIFF_WITH_ALG(opts, flag) (((opts)->xdl_opts & ~XDF_DIFF_ALGORITHM_MASK) | XDF_##flag)
+
enum diff_words_type {
DIFF_WORDS_NONE = 0,
DIFF_WORDS_PORCELAIN,