From: Jeff King Date: Tue, 19 Apr 2016 07:00:01 GMT Subject: Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic Message-ID: <20160419070001.GA21875@sigill.intra.peff.net> In-Reply-To: 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