fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

@kees Thanks, this is a very useful datapoint. In FreeBSD we currently use 12 characters of the hash in uname and had a similar discussion about whether that's sufficient.

My assertion is that we're very far away from where we need to worry about non-malicious (unintentional) conflicts. It's quite useful to know how easy it is to get an intentional conflict.

cgit.freebsd.org/src/commit/?i

@emaste It gets (obviously) exponentially more difficult to collide, so I think Geert's recommendation of 16 chars will be good for a while longer. (Assuming no quantumpocalypse.)

@KasTasMykolas @kees What about assigning every developer their own ID, and creating shortened commit IDs in the form <devid><N>, with N increasing? ;-)

@kees You gotta love this advice, though: “Make the tools deal with the cases we already have, and you'll find that the shortening is a complete non-issue.”

I'm afraid people will now try to solve it with genAI. Don't ask me why.

@kees I appreciate you did that! because it demonstrates a problem I recognized in so-called GUIDs -- that they are not as truly unique as people seem to assume and that it invites certain antipatterns that can bite hard

@kees With a 12 digit hash you only have to go through about 10⁸ guesses before you have a 50% chance of getting the collision, so I think everyone would accept it can be brute forced fairly easily.

However, git being CAM based and there really only being a single master tree, we can detect and prevent this using a pre-merge-commit hook in @torvalds 's tree. If it's malice we can stop there and if it really is an accidental collision a rebase of the pull would likely sort it.