‹ BackHN Continuity

Thread

Git 3.0's upcoming SHA-256 default will be a costly mistake

570 points · 536 comments · chmaynard

  1. purpleidea · · focus · HN ↗
    This means, if you migrate your repo, every single commit message that contains text like: "please see commit <sha1>" will now be broken.

    This will be a train wreck. I hope they don't release before adding compatibility modes to keep the existing sha1's around in the database.

    1. OneDeuxTriSeiGo · · focus · HN ↗
      Note that there exists multiple ways to continue to lookup SHA1s in a SHA256 repo.

      One example is to maintain git-replace refs for the rewritten SHAs but there also exist config flags to enable object format compatibility extensions that help translate the SHAs back and forth.

      <a href="https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-replace" rel="nofollow">https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-replace

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.