From 39153c809711885ca2ea5b527e4ff893170f1b6f Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Tue, 1 Jul 2025 21:22:36 +0000 Subject: help: add a build option for default hash We'd like users to be able to determine the hash algorithm that is the builtin default in their version of Git. This is useful for troubleshooting, especially when we decide to change the default. Add an entry for the default hash in the output of git version --build-options so that users can easily access that information and include it in bug reports. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- help.c | 1 + 1 file changed, 1 insertion(+) (limited to 'help.c') diff --git a/help.c b/help.c index 21b778707a..bd0be2ee57 100644 --- a/help.c +++ b/help.c @@ -810,6 +810,7 @@ void get_version_info(struct strbuf *buf, int show_build_options) SHA1_UNSAFE_BACKEND); #endif strbuf_addf(buf, "SHA-256: %s\n", SHA256_BACKEND); + strbuf_addf(buf, "default-hash: %s\n", hash_algos[GIT_HASH_DEFAULT].name); } } -- cgit v1.2.3