Adam Dinwoodie, testing for Git v3 in preparation for Nixpkgs, built Git with WITH_BREAKING_CHANGES=1 and found that git init still creates repositories using sha1 rather than sha256. He asked whether that is expected.

He confirmed the behavior at v2.56.0, on next and on main. He attached a Nix-based reproduction script and gave a simpler recipe that needs only a build with the breaking-changes flag followed by git init.

brian m. carlson replied that this does appear to be broken. He said he has a patch that should fix it, currently running through CI, and will send it once it is green, either that night or the next day.

No patch has been posted yet. The report matters for people validating the planned Git v3 defaults.