Order two directory entries so a depth-first walk emits globally sorted
relative paths.
The key is the entry name for a file and the name plus / for a directory,
because every path under a directory d begins d/. Comparing bare names
would be wrong wherever a separator sorts against an ordinary character: -
(0x2D) precedes / (0x2F), so a-1.md must be emitted BEFORE a/b.md even
though the directory a sorts before the file a-1.md by name alone.
Order two directory entries so a depth-first walk emits globally sorted relative paths.
The key is the entry name for a file and the name plus
/for a directory, because every path under a directorydbeginsd/. Comparing bare names would be wrong wherever a separator sorts against an ordinary character:-(0x2D) precedes/(0x2F), soa-1.mdmust be emitted BEFOREa/b.mdeven though the directoryasorts before the filea-1.mdby name alone.