--- Begin Message ---
Subject: |
Bug#402524: patch requires the same number of lines in the prefix and suffix contexts |
Date: |
Mon, 11 Dec 2006 00:33:06 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Package: patch
Version: 2.5.9-4
Severity: wishlist
Hello,
Please have a look at the attached a and a.diff files.
I tend to think that a.diff is a valid unified diff, that patch should be
able to apply on a. (I could only find
http://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html
for the description of the unified diff format).
For the review of text files or PO files diff, I prefer to keep whole
paragraphs in the context (and remove unrelated paragraphs), but then the
diff hunk do not have the same amount of prefix and suffix lines and
cannot be applied by patch
Currently, patch assumes (in locate_hunk) that if the number of prefix
context lines if greater than the number of suffix lines, the patch must
be located at the end of the file.
Assigning fuzz to prefix_fuzz and suffix_fuzz in patch.c:locate_hunk()
fixes this issue.
Thanks in advance,
--
Nekral
a
Description: Text document
a.diff
Description: Text document
--- End Message ---