GNU bug report logs -
#16864
overlapping chunks with the -I option
Previous Next
Full log
View this message in rfc822 format
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 <vincent <at> vinc17.net> - 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)
This bug report was last modified 11 years and 89 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.