Hash collision in git

What would actually happen if I had a hash collision while using git?

E.g. I manage to commit two files with the same sha1 checksum,
would git notice it or corrupt one of the files?

Could git be improved to live with that, or would I have to change to a new hash algorithm?

(Please do not deflect this question by discussing how unlikely that is – Thanks)

9 Answers
9

Leave a Comment