Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic
- From
Jeff King <peff@peff.net>
- Date
- Apr 19, 2016, 07:00 UTC
- Message-ID
- <20160419070001.GA21875@sigill.intra.peff.net>
- In-Reply-To
- <CAGZ79kaD3kyWdbT-PhR9XPV_qmYpQipZwvfYYcVvwk62+x5qnw@mail.gmail.com>
On Mon, Apr 18, 2016 at 11:47:52PM -0700, Stefan Beller wrote:
> I am convinced the better way to do it is like this: > > Calculate the entropy for each line and take the last line with the > lowest entropy as the last line of the hunk.
I'll be curious to see the results, but I think sometimes predictable and stupid may be the best route with these sorts of things. In particular, I'd worry that a content-independent measure of entropy might miss some subtleties of a particular language (e.g., that "*" is more or less meaningful than some other character). But we'll see. :)
-Peff