From: Junio C Hamano Date: Mon, 21 Jul 2025 16:14:25 +0000 (-0700) Subject: Merge branch 'bc/use-sha256-by-default-in-3.0' X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a636d395ff0b0ccecb4569c0fc80f7c55f2e5f2e;p=thirdparty%2Fgit.git Merge branch 'bc/use-sha256-by-default-in-3.0' Prepare to flip the default hash function to SHA-256. * bc/use-sha256-by-default-in-3.0: Enable SHA-256 by default in breaking changes mode help: add a build option for default hash t5300: choose the built-in hash outside of a repo t4042: choose the built-in hash outside of a repo t1007: choose the built-in hash outside of a repo t: default to compile-time default hash if not set setup: use the default algorithm to initialize repo format Use legacy hash for legacy formats builtin: use default hash when outside a repository hash: add a constant for the legacy hash algorithm hash: add a constant for the default hash algorithm --- a636d395ff0b0ccecb4569c0fc80f7c55f2e5f2e diff --cc help.c index 89cd47e3b8,bd0be2ee57..652efebf00 --- a/help.c +++ b/help.c @@@ -810,8 -810,7 +810,9 @@@ void get_version_info(struct strbuf *bu SHA1_UNSAFE_BACKEND); #endif strbuf_addf(buf, "SHA-256: %s\n", SHA256_BACKEND); + strbuf_addf(buf, "default-ref-format: %s\n", + ref_storage_format_to_name(REF_STORAGE_FORMAT_DEFAULT)); + strbuf_addf(buf, "default-hash: %s\n", hash_algos[GIT_HASH_DEFAULT].name); } }