3 ms·
I think the truncation is considered because a lot of software assumes git commit id has 160 bit length. It's not because of performance.
by hdhzy 10y ago
I think the truncation is considered because a lot of software assumes git commit id has 160 bit length. It's not because of performance.
- hermitdev 10y agoThere are only 2 reasonable rationales for the 160 bit restriction: it was arbitrary because that was the length of the chosen hash, or for performance (and no one will ever need more that 640kb of RAM, or 160 bits of hash). I'm guessing it was probably the first, though, and Linus designed for the immediate now, and not for the future.
- derefr 10y agoIt's not even a "restriction", so much as a fragile ecosystem of tools that parse the output of git commands. A lot of them assume particular column widths.