diff gives huge areas of unnecessary changes
Bug #315399 reported by
Matthew Fuller
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
diff seems to grab far too large an area for changes.
Consider this file:
--------------
x
A
y
x
B
y
x
C
y
x
D
y
--------------
Let's lowercase some letter. If we do D, it's fine. D and C both, looks fine:
--------------
@@ -5,8 +5,8 @@
B
y
x
- C
+ c
y
x
- D
+ d
y
--------------
But if we lowercase B as well, it goes all nutty:
--------------
@@ -2,11 +2,11 @@
A
y
x
- B
- y
- x
- C
- y
- x
- D
+ b
+ y
+ x
+ c
+ y
+ x
+ d
y
--------------
diff(1) doesn't do this:
--------------
@@ -2,11 +2,11 @@
A
y
x
- B
+ b
y
x
- C
+ c
y
x
- D
+ d
y
--------------
This makes reading the diffs very hard...
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: diff |
tags: | added: check-for-breezy |
To post a comment you must log in.
On Fri, 2009-01-09 at 10:25 +0000, fullermd wrote:
> Public bug reported:
>
> diff seems to grab far too large an area for changes.
>
> Consider this file:
>
> --------------
> x
> A
> y
> x
> B
> y
> x
> C
> y
> x
> D
> y
> --------------
bzr only lines up on unique items in the sequence - it first strips out
all dups: the x and y chars go.
then A, B, C, D are used on the left side.
> Let's lowercase some letter. If we do D, it's fine. D and C both, looks fine:
>
> --------------
> @@ -5,8 +5,8 @@
> B
> y
> x
> - C
> + c
> y
> x
> - D
> + d
> y
>
> --------------
I think there is a fuzz factor used here, I'd need to check th code.
>
> But if we lowercase B as well, it goes all nutty:
>
> --------------
> @@ -2,11 +2,11 @@
> A
> y
> x
> - B
> - y
> - x
> - C
> - y
> - x
> - D
> + b
> + y
> + x
> + c
> + y
> + x
> + d
> y
> --------------
And here it has matched from B on the left to the end of the file on the
right (because only ABCD were anchors).
-Rob
-- www.robertcolli ns.net/ keys.txt>.
GPG key available at: <http://