Comment by the8472
7 days ago
In practice I think a Rust project would have used toml which parses safely. The limitation there would be that toml requires strings to be utf8, so it couldn't represent all possible unix paths.
7 days ago
In practice I think a Rust project would have used toml which parses safely. The limitation there would be that toml requires strings to be utf8, so it couldn't represent all possible unix paths.
Which kind of makes it an unsuitable solution for the given problem right? Git is not free to (or at least doesn't consider itself free to) work only on a subset of possible paths.
Most applications could probably get away with not supporting control characters in paths, even git, because most file systems/OSes doesn’t support it anyway, as a user of control characters in a paths you can never trust it to work anyway.
_I_ would agree with you. But I’m also not a person writing a version control system for a kernel that still runs wrong-endianess hardware (I forgot which one we are using and can’t be bothered to look it up). And I think a major part of this is, that I assume that something is so insane, that people just shouldn’t do it and the people steering the kernel or git don’t (get to) assume that