Re: possible Improving diff algoritm

2012-12-14 Thread Bernhard R. Link
* Javier Domingo [121214 13:20]: > I think the idea of being preferable to have a blank line at the end > of the added/deleted block is key in this case. For symmetry I'd suggest to make it preferable to have blank lines at the end or the beginning. { old + } + + { + new } vs { old

Re: possible Improving diff algoritm

2012-12-12 Thread Junio C Hamano
Geert Bosch writes: > It would seem that just looking at the line length (stripped) of > the last line, might be sufficient for cost function to minimize. > Here the some would be 3 vs 0. In case of ties, use the last > possibility with minimum cost. -- 8< -- #ifdef A some stuff about A #endif

Re: possible Improving diff algoritm

2012-12-12 Thread Geert Bosch
On Dec 12, 2012, at 20:55, Morten Welinder wrote: > I was merely asking if an algorithm to pick between the > 2+ choices was allowed to look at the contents of the > lines. > > I.e., an algorithm would look at the C comment > example and determine that the choice starting containing > a full ins