]> Kevux Git Server - rit/commit
xdiff: change type of xdfile_t.changed from char to bool
authorEzekiel Newren <ezekielnewren@gmail.com>
Fri, 26 Sep 2025 22:41:59 +0000 (22:41 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Oct 2025 17:19:40 +0000 (10:19 -0700)
commit8b9c5d2e3a38b6e0c2278fe10fe2a4bf34496a9d
tree5a47978cd2b4006bbe5dd57744d1f680fbc09770
parente385e1b7d2d7f531a0006131e7f1d974de351df5
xdiff: change type of xdfile_t.changed from char to bool

The only values possible for 'changed' is 1 and 0, which exactly maps
to a bool type. It might not look like this because action1 and action2
(which use to be dis1, and dis2) were also of type char and were
assigned numerical values within a few lines of 'changed' (what used to
be rchg).

Using DISCARD/KEEP/INVESTIGATE for action1[i]/action2[j], and true/false
for changed[k] makes it clear to future readers that these are
logically separate concepts.

Best-viewed-with: --color-words
Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xdiffi.c
xdiff/xhistogram.c
xdiff/xpatience.c
xdiff/xprepare.c
xdiff/xtypes.h