3 ms·
Torvalds, in classic Unix hacker fashion, designed git to be so stupid it doesn't care what it's being used for, which goes quite a long way to making it all th
by derleth 13y ago
Torvalds, in classic Unix hacker fashion, designed git to be so stupid it doesn't care what it's being used for, which goes quite a long way to making it all things to all people.
Similar is how the Linux filesystem code flatly refuses to care about what encoding scheme filenames use as long as the byte 0x2F (ASCII '/') is only used to separate pathname components, the byte sequences 0x2E (".") and 0x2E 0x2E ("..") appearing alone in a component are special, and the byte 0x00 (ASCII nul) is only used to terminate the entire pathname. The kernel is so stupid it only sees byte sequences and only cares about those specific values and sequences; as a direct result, users can use any character encoding which guarantees those values will only be used for their respective purposes, and rely on easily-configurable applications to sort it out.
Here's Torvalds, Viro, and Ts'o chewing out someone who thought the kernel should enforce UTF-8 file and directory names:
http://yarchive.net/comp/linux/utf8.html http://yarchive.net/comp/linux/utf8.html
- rmc 13y agoI thought ".." was a hardlink to the parent directory created when a directory was created? Hence the kernel doesn't actually have to treat ".." as anything special, since, due to hardlinks, "it'll all work out"?