bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#402524: patch requires the same number of lines in the prefix and su


From: Christoph Berg
Subject: Bug#402524: patch requires the same number of lines in the prefix and suffix contexts (fwd)
Date: Mon, 11 Dec 2006 13:58:51 +0100
User-agent: Mutt/1.5.13+cvs (2006-07-13)

Hi,

here's a wishlist item for patch that seems reasonable.

Christoph
PS: please Cc: all replies to address@hidden, thanks.
-- 
address@hidden | http://www.df7cb.de/
--- 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

Attachment: a
Description: Text document

Attachment: a.diff
Description: Text document


--- End Message ---

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]