Hacker News new | ask | show | jobs
by rspeer 4459 days ago
It is almost certain that there are a quarter-billion published Git commits by now. (GitHub says there were 150 million pushes in 2013 alone, and many of those have multiple commits.)

This means it is likely that, purely by coincidence, someone has at some point had their commit labeled as (badc0de).

2 comments

Github doesn't seem to allow searching revision hashes, but presumably Google has most of Github crawled by now, and I didn't spot any commits with that as a label: https://encrypted.google.com/search?num=100&q=badc0de%20site... (more hits than I expected though).
Google doesn't appear to match partial hashes. I searched for a random GitHub commit hash, and it showed up, then removed one character, and it didn't.
If you switch to verbatim there are only about a dozen.

I think the odds of an accidental collision with badc0de are pretty low.

Each hex character represents 4 bits. That means that a 7 character string is 28 bits. That's about 268 million possibilities. On average, it would take around 134 million commits to get one that started with "badc0de".
Interesting

    1 - (1 - 1/16^7)^250000000 ~= 61%