On Tue, 12 Apr 2016, Stefan Beller wrote:

> On Wed, Apr 6, 2016 at 10:47 AM, Jacob Keller <jacob.kel...@gmail.com> wrote:
> >
> > I started attempting to implement this heuristic within xdiff, but I
> > am at a loss as to how xdiff actually works. I suspect this would go
> > in xdi_change_compact or after it, but I really don't understand how
> > xdiff represents the diffs at all...
> 
> I agree that this seems like the right place.
> 
> On the off chance that David, the author of xdiff remembers that
> part, I cc'd him. (The whole discussion on better diffs is found at
> http://thread.gmane.org/gmane.comp.version-control.git/290093)

That was a zillions of years ago :) , but from a quick look at email 
thread, if you want to do it within xdiff, xdi_change_compact would be the 
place.
The issue is knowing in which situations one diff look better than 
another, and embedding an if-tis-do-tat logic deep into the core diff 
machinery.
In theory one could implement the same thing higher up, working with the 
unified diff text format, where maybe a user can provide its own diff 
post-process hook script.
In any case, that still leaves open the issue on what to shift in the diff 
chunks, and in which cases. Which is likely going to be language/format 
dependent. IMHO, it gets nasty pretty quickly.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to