Re: [PATCH] diff compaction heuristic: favor shortest neighboring blank lines
- From
Stefan Beller <sbeller@google.com>
- Date
- Jun 17, 2016, 16:09 UTC
- Message-ID
- <CAGZ79kZgdbqnWW9uqeBHNDbyGVfc0x5gTJbyD0Nyi1i3SNvENQ@mail.gmail.com>
- In-Reply-To
- <20160617153637.GA9314@sigill.intra.peff.net>
On Fri, Jun 17, 2016 at 8:36 AM, Jeff King <peff@peff.net> wrote:
Show 7 quoted lines
> > 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!
Show 7 quoted lines
> > 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