From: Ezekiel Newren Date: Fri, 26 Sep 2025 02:29:16 GMT Subject: Re: [PATCH v5 12/13] xdiff: use enum macros NONE(0), SOME(1), TOO_MANY(2) in xprepare.c Message-ID: In-Reply-To: On Thu, Sep 25, 2025 at 12:40 PM Ezekiel Newren wrote: > I'm really struggling with how to write this commit message. I would > very much appreciate suggestions. Here is what I have so far: > --- commit message start --- > xdiff: use enum macros NONE(0), SOME(1), TOO_MANY(2) in xprepare.c > ... I think I understand what is happening now. The macros I should be using are: DISCARD(0), KEEP(1), INVESTIGATE(2). The comments in and around xdl_cleanup_records() and xdl_clean_mmatch() uses the term discard, and not discarded. I think what DISCARD means is discard this line from consideration in the diff algorithm, and KEEP means the diff algorithm is going to look at that line. INVESTIGATE means that the current line has more matches in the other file than some threshold, so we need to do some more work to decide if the line should be kept or discarded. xdl_cleanup_records() does not belong in xprepare.c because it is only used by the classic diff (myers/minimal). It should be moved to xdiffi.c, but it depends on the classifier which is only defined in xprepare.c. So I can't move xdl_cleanup_records() until more of the code has been cleaned up. I'll work on the commit, and hopefully publish the next version soon.