aboutsummaryrefslogtreecommitdiffstats
path: root/help.c
diff options
context:
space:
mode:
authorJustin Tobler <jltobler@gmail.com>2025-04-03 09:05:29 -0500
committerJunio C Hamano <gitster@pobox.com>2025-04-07 14:39:27 -0700
commit6cf65440d39250880e747d2c5281881e95eb9499 (patch)
treefe2f97c48e21f64be5f831470b7703c51ad9d9db /help.c
parenthelp: include SHA implementation in version info (diff)
downloadgit-6cf65440d39250880e747d2c5281881e95eb9499.tar.gz
git-6cf65440d39250880e747d2c5281881e95eb9499.zip
help: include unsafe SHA-1 build info in version
In 06c92dafb8 (Makefile: allow specifying a SHA-1 for non-cryptographic uses, 2024-09-26), support for unsafe SHA-1 is added. Add the unsafe SHA-1 build info to `git version --build-info` and update corresponding documentation. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.c')
-rw-r--r--help.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/help.c b/help.c
index 991a9525db..6ef90838f1 100644
--- a/help.c
+++ b/help.c
@@ -805,6 +805,10 @@ void get_version_info(struct strbuf *buf, int show_build_options)
strbuf_addf(buf, "zlib: %s\n", ZLIB_VERSION);
#endif
strbuf_addf(buf, "SHA-1: %s\n", SHA1_BACKEND);
+#if defined SHA1_UNSAFE_BACKEND
+ strbuf_addf(buf, "non-collision-detecting-SHA-1: %s\n",
+ SHA1_UNSAFE_BACKEND);
+#endif
strbuf_addf(buf, "SHA-256: %s\n", SHA256_BACKEND);
}
}