Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 2:44 PM, Junio C Hamano wrote: > Jacob Keller writes: > What you have is a pure developer support; aim to come up with "good enough" way, giving developers an easier way to experiment with, and remove it before the feature is shipped to the end user. >> >> W

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Junio C Hamano
Jacob Keller writes: >>> What you have is a pure developer support; aim to come up with "good >>> enough" way, giving developers an easier way to experiment with, and >>> remove it before the feature is shipped to the end user. > > What are your thoughts on adding this do the gitattributes diff >

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 2:15 PM, Jacob Keller wrote: > On Fri, Apr 15, 2016 at 1:30 PM, Junio C Hamano wrote: >> Jacob Keller writes: >> >>> On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: >>> I actually do not think these knobs should exist when the code is mature enough to be

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 1:30 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: >> >>> I actually do not think these knobs should exist when the code is >>> mature enough to be shipped to the end users. >>> >>> Use "diff.compactionHeurist

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Junio C Hamano
Jacob Keller writes: > On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: > >> I actually do not think these knobs should exist when the code is >> mature enough to be shipped to the end users. >> >> Use "diff.compactionHeuristics = " as an opaque set of bits to >> help the developers while

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> +diff.emptyLineHeuristic:: >> >> I was looking at the TODO here and thought about the name: >> It should not encode the `emptyLine` into the config option as >> it is only one of many heuristics. >> >> It should

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 12:57 PM, Stefan Beller wrote: > I was looking at the TODO here and thought about the name: > It should not encode the `emptyLine` into the config option as > it is only one of many heuristics. > > It should be something like `diff.heuristic=lastEmptyLine` > The we could ad

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Junio C Hamano
Stefan Beller writes: >> +diff.emptyLineHeuristic:: > > I was looking at the TODO here and thought about the name: > It should not encode the `emptyLine` into the config option as > it is only one of many heuristics. > > It should be something like `diff.heuristic=lastEmptyLine` > The we could ad

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 9:51 AM, Jacob Keller wrote: > From: Stefan Beller > > In order to produce the smallest possible diff and combine several diff > hunks together, we implement a heuristic from GNU Diff which moves diff > hunks forward as far as possible when we find common context above and

[RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
From: Stefan Beller In order to produce the smallest possible diff and combine several diff hunks together, we implement a heuristic from GNU Diff which moves diff hunks forward as far as possible when we find common context above and below a diff hunk. This sometimes produces less readable diffs