What to do in case of hash collision?

From @tomachinz on Thu Mar 30 2017 07:12:03 GMT+0000 (UTC)

ipfs currently uses a ‘multihash’ where every hash value is tagged with the hash function used to generate it. As of now, the default hash function is sha256, and if sha256 is shown to be broken, aparently its possible to switch to sha512 on the fly - lengthen our root address hash function to something like sha512 without breaking any existing data.