3 ms·
> Secondly, wouldn't moving to SHA-2 or SHA-3 be a compatibility-breaking change? If git allows for extra fields in commits and tags (I don't know if it's the
by cesarb 10y ago
> Secondly, wouldn't moving to SHA-2 or SHA-3 be a compatibility-breaking change?
If git allows for extra fields in commits and tags (I don't know if it's the case), one could have "tree3" and "parent3" entries on each commit, which point to a parallel sha-3 tree (with sha-3 nodes and leaves) and sha-3 of the parent commit(s). Old git would ignore these entries, new git would use them (and check they point to the same parents/blobs as their sha-1 equivalent). Hacky and ugly, but doable.