]> git.ipfire.org Git - thirdparty/git.git/commit
Enable SHA-256 by default in breaking changes mode
authorbrian m. carlson <sandals@crustytoothpaste.net>
Tue, 1 Jul 2025 21:22:37 +0000 (21:22 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Jul 2025 21:58:26 +0000 (14:58 -0700)
commitc79bb70a2e7d9158ec165ea16ad45371cd6e350d
treed35981c46cb19e0609d073719be6b384ec914b60
parent39153c809711885ca2ea5b527e4ff893170f1b6f
Enable SHA-256 by default in breaking changes mode

Our document on breaking changes indicates that we intend to default to
SHA-256 in Git 3.0.  Since most people choose the default option, this
is an important security upgrade to our defaults.

To allow people to test this case, when WITH_BREAKING_CHANGES is set in
the configuration, build Git with SHA-256 as the default hash.  Update
the testsuite to use the build options information to automatically
choose the right value.

Note that if the command substitution for GIT_TEST_BUILTIN_HASH fails,
so does the testsuite—and quite spectacularly at that.  Thus, the case
where the Git binary is somehow subtly broken will not go undetected.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hash.h
t/test-lib.sh