Improve diff/fixup when diff is greedy at end of a diff.
commit8420e684cf3736de120db8f7828408d06240566c
authorNeil Brown <neilb@suse.de>
Tue, 23 Mar 2010 06:09:05 +0000 (23 17:09 +1100)
committerNeil Brown <neilb@suse.de>
Tue, 23 Mar 2010 06:09:05 +0000 (23 17:09 +1100)
tree081e2b41dd54d0b9bf2ac077857f625b51b554ee
parent8234ce905fb4e98eef0129dfc2b1e26047101da1
Improve diff/fixup when diff is greedy at end of a diff.

The 'fixup' code to make up for the greediness of diff did not
treat the end of the diff as a (zero length) match which can be grown.
This could leave no context at the end of a 'diff'.

Applying a patch with no trailing context can cause confusion.

This fixes the issue raise by Debian Bug 271766

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=271766

The sample from that bug is included as a test.

Signed-off-by: NeilBrown <neilb@suse.de>
diff.c
tests/contrib/xfaces/merge [new file with mode: 0644]
tests/contrib/xfaces/orig [new file with mode: 0644]
tests/contrib/xfaces/patch [new file with mode: 0644]