Heya,
On Wed, Aug 5, 2009 at 08:45, Daniel Barkalow[off-list ref] wrote:
Someday, I want to
have a diff output format that makes these things clear somehow. I think
it would be not-too-hard to get the diff code to determine that an
addition matches or almost matches a deletion (or some unchanged code),
and provide library access to this information, but representing it to
humans (and getting patch to still work) is hard.
I started on this a while ago (as part of some post-GSoC git-stats
work), but I had a hard time finding a good rule to determine whether
an added hunk is similar enough to a deleted hunk elsewhere. Perhaps a
variant of Levenshtein can be used to determine how different two
hunks are; I tried diffing the two hunks and then looking at the
ration between the size of the diff and the size of the original hunk,
but as said that didn't really work out.
--
Cheers,
Sverre Rabbelier