From: Stefan Beller Date: Fri, 17 Jun 2016 16:09:46 GMT Subject: Re: [PATCH] diff compaction heuristic: favor shortest neighboring blank lines Message-ID: In-Reply-To: <20160617153637.GA9314@sigill.intra.peff.net> On Fri, Jun 17, 2016 at 8:36 AM, Jeff King wrote: > > Did you want something that triggers the "bad" case with the existing > compaction heuristic? > > I gave one in: > > http://article.gmane.org/gmane.comp.version-control.git/296947 I found that out after sending the initial patch. Thanks for pointing out! > > I think the difference is that in my example, the diff (before > compaction) has the blank line at the top (because we are adding a new > entry at the bottom), whereas in yours, the blank line is at the bottom. > > This patch does make my "bad" case look better. Unfortunately, it > re-breaks another case: I think before spending more time on discussing and implementing new (hopefully better) heuristics, I'd want to step back and try to be a bit more systematic, i.e. I'll want to collect lots of test cases in different languages and use cases. A mini test suite, maybe? I think I'll include these examples in there, too. Thanks, Stefan