Hello.

Received this from the Debian bug system today.
This bug is not present in diffutils 2.8.1.

---------- Forwarded message ----------
From: Timo Juhani Lindfors <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Date: Thu, 15 Apr 2010 02:37:35 +0300
Subject: Bug#577832: diffutils: [REGRESSION] newline is added to a line that 
has no newline if the line is in context

Package: diffutils
Version: 1:2.9-2
Severity: important

Steps to reproduce:
1) echo -en '\nline1\nline2\nline3' > a
2) echo -en '\nnew line\n\nline1\nline2\nline3' > b
3) diff -u a b > c
4) patch -p0 -F0 < c

Expected results:
3) c contains

--- a   2010-04-15 02:30:51.000000000 +0300
+++ b   2010-04-15 02:30:51.000000000 +0300
@@ -1,4 +1,6 @@

+new line
+
 line1
 line2
 line3
\ No newline at end of file

4) patch prints

patching file a

Actual results:
3) c contains

--- a   2010-04-14 23:31:49.000000000 +0000
+++ b   2010-04-14 23:31:49.000000000 +0000
@@ -1,4 +1,6 @@

+new line
+
 line1
 line2
 line3

4) patch prints

patching file a
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file a.rej

[...]


Reply via email to