]> git.ipfire.org Git - thirdparty/git.git/commit - diff.c
xdiff: reassign xpparm_t.flags bits
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 Oct 2017 06:15:51 +0000 (15:15 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Oct 2017 06:57:30 +0000 (15:57 +0900)
commit446d12cb3fbee1b641f97336df3abe8968e3db59
tree2452eca3eeada2329dbb1bdda0f661d67127e363
parent42e6fde5c28150206956ea4be490d886c4ecbd68
xdiff: reassign xpparm_t.flags bits

We have packed the bits too tightly in such a way that it is not
easy to add a new type of whitespace ignoring option, a new type
of LCS algorithm, or a new type of post-cleanup heuristics.

Reorder bits a bit to give room for these three classes of options
to grow.  Also make use of XDF_WHITESPACE_FLAGS macro where we check
any of these bits are on, instead of using DIFF_XDL_TST() macro on
individual possibilities.  That way, the "is any of the bits on?"
code does not have to change when we add more ways to ignore
whitespaces.

While at it, add a comment in front of the bit definitions to
clarify in which structure these defined bits may appear.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
xdiff/xdiff.h