‹ BackHN Continuity

Thread

Looking forward to Git 2.56 – and 3.0

207 points · 116 comments · chmaynard

  1. KolmogorovComp · · focus · HN ↗
    Does it mean that when switching trop sha1 to sha256 you need to forcepush and rewrite all history? Wouldn’t that be a massive source of potential vulnerabilities?
    1. schacon · · focus · HN ↗
      It's much, much worse than that.

      Yes, you do need to do that. However, there is also much more work after that.

      Git will not intermingle SHA-256 and SHA-1 enabled repositories, even in things like submodules, so anything used in that manner will need to keep both versions into the indefinite future. If you rely on a submodule that has not yet converted, you will have to convert it yourself and try to keep it up to date, or the forge will have to automatically keep a bidirectional mirror (if you have submodules in various forges, you'll have to wait for all of them to do it), etc.

      This means that every SHA referenced anywhere on the internet, in commit messages, in issues, in code comments is now invalid and needs a mapping to find the rewritten one for forever.

      It also means that every commit signature ever made is now invalid and will probably have to be stripped from the rewritten new 256 history because it's impossible to resign everything.

      Companies like Google and GitHub are working on keeping two versions of each repository so that there can be long stages of ecosystem migrations, but no matter what, it's going to be a huge pain for millions of developers for years to come.

      1. Ferret7446 · · focus · HN ↗
        It's not quite that bad. Just freeze/archive the old, rewrite everything to the new, then dump a lookup table somewhere to remap SHA1s.

        Tools and scripts will have to be migrated of course, but I'm the brave new world of agentic coding it shouldn't be too hard.

        The main pain is providing user support to developers who are curiously not very tech/OS savvy (has anyone else noticed this phenomenon?)

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.