[webkit-dev] Git meeting notes
Maciej Stachowiak
mjs at apple.com
Tue Apr 13 00:18:23 PDT 2010
On Apr 12, 2010, at 9:44 PM, Maciej Stachowiak wrote:
>
> On Apr 12, 2010, at 8:15 PM, Timothy Hatcher wrote:
>
>> Only the first 5-7 characters are needed to identify a single
>> commit (enough of the hash prefix to be unique). So REGRESSION
>> (96c3b0) vs REGRESSION(r12345).
>
> How long will 7 characters last before you hit the birthday paradox?
And to answer my own question (because I'm a nerd), a 7 hex digit hash
prefix has a 50% chance of at least one pair of revisions colliding
when there are at least 19290 revs. So we're already past the birthday
paradox threshold to be using only 7 digits (assuming the hashes are
uniformly distributed).
This answer brought to you by Wikipedia and Wolfram|Alpha, favorites
of pedantic nerds everywhere:
http://en.wikipedia.org/wiki/Birthday_problem#Cast_as_a_collision_problem
http://www.wolframalpha.com/input/?i=sqrt%282*2%5E%284*7%29*ln%281%2F%281-.5%29%29%29
Regards,
Maciej
More information about the webkit-dev
mailing list