Paul Eggert
d8047ae86d
sort: fix several version-sort problems
...
This also affects ls -v in some corner cases.
Problems reported by Michael Debertol <https://bugs.gnu.org/49239 >.
While looking into this, I spotted some more areas where the
code and documentation did not agree, or where the documentation
was unclear. In some cases I changed the code; in others
the documentation. I hope things are nailed down better now.
* doc/sort-version.texi: Distinguish more carefully between
characters and bytes. Say that non-identical strings can
compare equal, since they now can. Improve readability in
various ways. Make it clearer that a suffix can be the
entire string.
* src/ls.c (cmp_version): Fall back on strcmp if filevercmp
reports equality, since filevercmp is no longer a total order.
* src/sort.c (keycompare): Use filenvercmp, to treat NULs correctly.
* tests/misc/ls-misc.pl (v_files):
Adjust test to match new behavior.
* tests/misc/sort-version.sh: Add tests for stability,
and for sorting with NUL bytes.
2022-02-12 20:15:03 -08:00
..
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-30 23:13:52 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-02-05 13:47:07 -08:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-02-12 20:15:03 -08:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-02-12 20:15:03 -08:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00