Looking forward to Git 2.56 – and 3.0

(lwn.net)

49 points | by chmaynard 4 hours ago

4 comments

  • KolmogorovComp 3 hours ago
    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?
    • infogulch 38 minutes ago
      Couldn't you write something that checks every commit's content and message is byte equal to the old tree? One scan through the history to verify it should be relatively simple if not cheap. Should be built into git.
    • em-bee 2 hours ago
      i guess that for now only the default will change for new repositories. support for sha1 is not going to be dropped, so most existing repositories won't switch any time soon. if you want to switch then yes, it sounds like a force push might be needed, although it could also be that simply switching is not possible, but that instead you have to create a new repo and import the history from the old repo, forcing everyone to clone the new repo intentionally.
    • nomel 3 hours ago
      I don't know much about this. How does that enable vulnerabilities exactly?
  • WCSTombs 3 hours ago
    `git add --resolved` is a wonderful idea, and definitely something I would start using.
  • drgo 2 hours ago
    [flagged]
  • coliveira 44 minutes ago
    It is regrettable that they're trying to coerce the use of Rust everywhere just for the sake of it. It's a nonsense that is now forced on everyone.
    • jcranmer 16 minutes ago
      The comments gives a link to a recent talk about the motivation for using Rust in Git: https://github.com/bk2204/talk-rust-in-git/blob/dev/presenta...

      I wouldn't agree with all of those reasons, but it's very definitely not "just for the sake of it." One of the better reasons so many people look to writing some things in Rust is that we now have pretty ample evidence than trying to write a binary file format parser in C is a cornucopia of CVEs that are just simply absent in Rust, and the excuse of "well, but a sufficiently smart programmer doesn't write bugs in C" doesn't cut it anymore.

      • coliveira 8 minutes ago
        Somehow we have binary file format parsers written in C everywhere, so the real world shows it is possible and we do have programmers capable of doing it.
    • tombert 30 minutes ago
      I don't think it's "just for the sake of it". I think they believe that the Rust code will be safer.
      • coliveira 18 minutes ago
        If that's the case, they should stop using git and Linux right now, because it's everything written in C. Having 0.1% of the code in a safe language will not change anything, it's only a bad security blanket.
        • aw1621107 0 minutes ago
          > Having 0.1% of the code in a safe language will not change anything, it's only a bad security blanket.

          Just because something does provide an immediate perfect solution does not mean it isn't not worth investigating and/or pursuing.

          Also consider that bugs tend to be more prevalent in new code (e.g., [0]) as a result, you are likely to see more of a benefit from writing new code in a memory-safe language than raw line count proportions would indicate.

          [0]: https://security.googleblog.com/2024/09/eliminating-memory-s...

        • nvme0n1p1 6 minutes ago
          You don't believe in slowly and iteratively improving a codebase over time? Should git stick with its weird mishmash of C and perl and shell scripts forever, for tradition's sake, performance and maintainability be damned?