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

Jun 30, 2021 · 3:57 AM UTC

1
11
(I'm using "git log --format=format:%h" as the definition of what git shows.)
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
This tweet is unavailable
git log --format=format:%h does the same, it turns out: $ git log -n 5 --format=format:%h e2af01557ac0 e2af01557ac0 67fdae4bf2f4 72d496d755369 1489b47d07ee b9f756c3b185 (oh, if only I could tell twitter to show this at fixed width!)