A random discovery today about the Chromium git repository at chromium.googlesource.com/ch… . git varies the length of the short hashes it shows based on an estimate of the repository's size. For Chromium it shows 12-digit short hashes.
2
1
17
It turns out that for the Chromium repository, 12 digits is not enough. There are two revisions in the repo whose initial 12 digits are the same, 72d496d75536. (If it weren't for that pair of revisions, 10 digits would be good enough. But 9 digits has quite a few collisions.)
1
11
(I'm using "git log --format=format:%h" as the definition of what git shows.)

Jun 30, 2021 · 3:57 AM UTC

1
(Also, I have a vague sense that git identifies things other than revisions by these hashes as well, so there may be other things I should be examining for collisions. But I'm not that much of a git expert.)
2