Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


There 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.


It'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: