2 ms·
Great example of Hyrum's Law, https://www.hyrumslaw.com/ https://www.hyrumslaw.com/. Comments about SHA256 are irrelevant - you can misuse the prefix of a SHA2
by hn_throwaway_99 2y ago
Great example of Hyrum's Law, https://www.hyrumslaw.com/ https://www.hyrumslaw.com/.
Comments about SHA256 are irrelevant - you can misuse the prefix of a SHA256 hash just as easily. The issue is that people got used to human-readable hash prefixes of 10-12 characters as "unique" for all intents and purposes, despite the fact that there were never any uniqueness guarantees for prefixes and git has always handled collisions with short object IDs as ambiguous - it's just that it's so rare to happen in the real world that lots of script writers treated that "mostly unique" as a guarantee.
IMO support for short object IDs is a mistake, as is any behavior that "works this way 99.999% of the time, but hey developer don't forget you need to also code for that .001% edge case". I'm always just copying and pasting things around anyway, so it really doesn't make much difference to me if I'm copying 12 chars or 64.
- poincaredisk 2y ago>so it really doesn't make much difference to me if I'm copying 12 chars or 64. It doesn't have to be 12 characters. I often type short git hashes - maybe 5 characters - when jumping between commits.