pub fn os_from_bytes(bytes: &[u8]) -> OsStringExpand description
Build an OsString from raw filesystem-path bytes, losslessly on Unix.
- Unix: the bytes are the OS path encoding, wrapped verbatim via
OsStringExt::from_vec, so a filename whose bytes are not valid UTF-8 survives byte-for-byte. - Other platforms (Windows/WASI):
gitandjjemit their-z/ machine path output as UTF-8 there, so the bytes are decoded as UTF-8. A genuinely invalid sequence — which these tools do not produce on this path — falls back to the lossy replacement, preserving the pre-existing WindowsString/OsStringbehaviour (Unicode names like𝓁abcstill round-trip).