Updating the Git protocol for SHA-256
One of the comments mentioned that there was a suggestion (presumably rejected) to "rotate" the first character of the hex string for the SHA256 hashes by 16 characters, so 0 becomes g, 1 becomes h, etc. (that way the SHA256 hashes would be unambiguously not SHA1 hashes, even when abbreviated).<p>This made me think... why are we using long, unwieldy base-16 hex strings at all?  Why not use an alphabetic (non-numeric) base-46 string: 20 lowercase letters ([g-z]), 26 capital letters ([A-Z])?  Then the new SHA256 hash strings end up being <i>shorter</i> than the old SHA1 strings, and there is no overlap with the [0-9a-f] range of the base-16 strings.<p>If you wanted to even it out to 64 characters, you could create a "modified base-64" that doesn't use [0-9a-f] and instead uses more special characters (though for convenience you'd want to choose characters that are shell-safe and possibly even URL-safe, which might make this not work).  Alternatively you could use a subset for a base-32 representation.<p>The downside -- perhaps a significant one? -- is that you can't use standard tools like `sha256sum` or the representation conversion functions into the stdlib of many languages to generate these hashes; it would require custom code.  Not sure if that's a concern, though.