Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes: > On Thu, Sep 29, 2016 at 11:55 AM, Linus Torvalds > <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: >> >> For the kernel, just the *math* right now actually gives 12 >> characters. For current git it actually seems to say that 8 is the >> correct number. For small projects, you'll still see 7. > > Sorry, the git number is 9, not 8. The reason is that git has roughly > 212k objects, and 9 hex digits gets expected collisions at about 256k > objects. > > So the logic means that we'll see 7 hex digits for projects with less > than 16k objects, 8 hex digits if there are less than 64k objects, and > 9 hex digits for projects like git that currently have fewer than 256k > objects. Whew. I was wondering where my brain went wrong, as I knew we have 200k objects and 8 hexdigits means 1<<16 = 64k which is way too short.