]> git.neil.brown.name Git - wiggle.git/commit
bestmatch: improve poor matches.
authorNeilBrown <neilb@suse.de>
Thu, 14 Feb 2013 05:30:29 +0000 (16:30 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 14 Feb 2013 05:30:29 +0000 (16:30 +1100)
commit20f3c4e3aff6d4a1479974b0ff095bdfc00d4e23
treec8450a1d83a2ea630e2383f4d67648cc1678de66
parent11da12692c1244203ce9634fa96c2e455cc6d9ef
bestmatch: improve poor matches.

If the bestmatch doens't include all of the lines in a hunk, try to
find matches between the unmatch parts of the hunk, and surrounding
text in the original.

This is particularly useful when some of the context is just blank
lines.  The best-match algorithm might ignore blank lines because they
aren't big enough to justify much distance from the rest of the match.

This makes tests/linux/raid1-A/merge a lot nicer.

Signed-off-by: NeilBrown <neilb@suse.de>
bestmatch.c
tests/linux/md-resync/merge
tests/linux/raid1-A/merge