-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.
Milestone
Description
The x/tools diff algorithm reports correct but non-minimal diffs even for the trivial case where a new line is inserted in the middle of a two-line file. For example:
got := "aaa\nccc\n"
want := "aaa\nbbb\nccc\n"
delta := diff.Unified("got", "want", got, want)
GNU diff -u:
--- want
+++ got
@@ -1,2 +1,3 @@
aaa
+bbb
ccc
diff.Unified:
--- got
+++ want
@@ -1,2 +1,3 @@
-aaa
+aaa
+bbb
ccc
We should match the GNU diff behavior in cases this simple.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.