emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#16864: closed (overlapping chunks with the -I opti


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#16864: closed (overlapping chunks with the -I option)
Date: Tue, 25 Feb 2014 06:02:02 +0000

Your message dated Mon, 24 Feb 2014 22:01:05 -0800
with message-id <address@hidden>
and subject line Re: [bug-diffutils] bug#16864: overlapping chunks with the -I 
option
has caused the debbugs.gnu.org bug report #16864,
regarding overlapping chunks with the -I option
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
16864: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16864
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: overlapping chunks with the -I option Date: Mon, 24 Feb 2014 15:31:37 +0100 User-agent: Mutt/1.5.21-6305-vl-r59709 (2013-04-16)
Consider two files:

file1:
1a
2
3a
4
5
6

file2:
1b
2
3b
4
5
6
7

With diff (GNU diffutils) 3.3 under Debian/unstable, I get:

$ diff -u -I3 file1 file2
--- file1       2014-02-24 12:58:12.485367096 +0100
+++ file2       2014-02-24 12:58:08.879933593 +0100
@@ -1,6 +1,6 @@
-1a
+1b
 2
-3a
+3b
 4
 5
 6
@@ -4,3 +4,4 @@
 4
 5
 6
+7

i.e. with overlapping chunks. Ditto with the latest patches.
Here I would expect:

--- file1       2014-02-24 12:58:12.485367096 +0100
+++ file2       2014-02-24 12:58:08.879933593 +0100
@@ -1,6 +1,7 @@
-1a
+1b
 2
-3a
+3b
 4
 5
 6
+7

Note that if the 3rd line is the same in both files, one gets
only one chunk:

@@ -1,6 +1,7 @@
-1a
+1b
 2
 3
 4
 5
 6
+7

so that getting 2 chunks with -I is definitely unexpected.

-- 
Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



--- End Message ---
--- Begin Message --- Subject: Re: [bug-diffutils] bug#16864: overlapping chunks with the -I option Date: Mon, 24 Feb 2014 22:01:05 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 Thanks for reporting that. I applied the attached patches. The first fixes the bug and adds a test case, the second fixes some unlikely and hard-to-test-for integer-overflow bugs I noticed while I was in the neighborhood.

Attachment: 0001-diff-fix-bug-with-I-and-overlapping-hunks.patch
Description: Text document

Attachment: 0002-diff-sdiff-minor-integer-overflow-fixes.patch
Description: Text document


--- End Message ---

reply via email to

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