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
Replying to @indygreg
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!)

Jun 30, 2021 · 3:12 PM UTC