Skip to content

Commit 39153c8

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9d619f2 commit 39153c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

help.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ void get_version_info(struct strbuf *buf, int show_build_options)
810810
SHA1_UNSAFE_BACKEND);
811811
#endif
812812
strbuf_addf(buf, "SHA-256: %s\n", SHA256_BACKEND);
813+
strbuf_addf(buf, "default-hash: %s\n", hash_algos[GIT_HASH_DEFAULT].name);
813814
}
814815
}
815816

0 commit comments

Comments
 (0)