Detect ordering-only differences in text files
This bug was originally reported by Paul Wise (@pabs) in Debian bug #1022145:
Package: diffoscope
Version: 224
Severity: wishlist
It would be nice if diffoscope could detect that text files are only
different because of ordering differences, currently it cannot:
$ (echo foo ; echo bar) > foo
$ (echo bar ; echo foo) > bar
=20
$ diffoscope foo bar
--- foo
+++ bar
@@ -1,2 +1,2 @@
-foo
bar
+foo
=20
$ echo $?
1
=20
$ (echo foo ; echo bar ; echo baz ; echo biz ; echo buz) > foo
$ (echo bar ; echo foo ; echo baz ; echo biz ; echo buz) > bar
=20
$ diffoscope foo bar
--- foo
+++ bar
@@ -1,5 +1,5 @@
-foo
bar
+foo
baz
biz
buz
=20
$ echo $?
1