On Wed, 6 Oct 2010 15:33:56 +0200, Andreas Gruenbacher wrote: > On Friday 01 October 2010 16:55:32 Jean Delvare wrote: > > Instead, my feeling is that, after shift_boundaries's work, an extra cleanup > > step could be taken to simplify the output. > > The reason for the suboptimal result here is that the diffing algorithm is > giving up unless find_minimal is true (it hits last return statement in > diag() > in diffseq.h). It whouldn't be hard to check for this particular pattern > after shift_boundaries(), but that pattern can only occur if the algorithm > has > given up, and I don't think optimizing this case is worth the cost.
Oh well. You know the code better than I do, and I do not have more time to spend on this. If it is accepted that diff may produce such a bad-looking output by default, I'll make sure to always use option -d from now on. -- Jean Delvare
