From: Ezekiel Newren Date: Wed, 24 Sep 2025 15:14:24 GMT Subject: Re: [PATCH v5 13/13] xdiff: change type of xdfile_t.changed from char to bool Message-ID: In-Reply-To: On Wed, Sep 24, 2025 at 4:21 AM Phillip Wood wrote: > > On 23/09/2025 22:24, Ezekiel Newren via GitGitGadget wrote: > > From: Ezekiel Newren > > > > The only values possible for 'changed' is 1 and 0, which exactly maps > > to a bool type. It might not look like this is the case because > > matches1 and matches2 (which use to be dis1, and dis2) were also char > > and were assigned numerical values within a few lines of 'changed' > > (what used to be rchg). > > > > Using NONE, SOME, TOO_MANY for matches1[i]/matches2[j], and true/false > > for changed[k] makes it clear to future readers that these are > > logically separate concepts. > > Nicely explained - I think this change is a very good idea and > separating it out like this makes it much clearer what's going on > compared to V4. Thank you! It was obvious to me because I've been refactoring xdiff for many months now, but I wasn't doing a good job of expressing why these 2 concepts are closely related, but distinct.