When compiled with DC_AND_OPENSSL_SHA1, this new config setting allows to switch from the collision-detecting SHA-1 routines (SHA1DC) to the noticeably faster OpenSSL ones. The default is still to detect collisions. Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx> --- config.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config.c b/config.c index 1a4d85537b3..f94e2963e57 100644 --- a/config.c +++ b/config.c @@ -1205,6 +1205,14 @@ static int git_default_core_config(const char *var, const char *value) return 0; } + if (!strcmp(var, "core.enablesha1dc")) { +#ifdef DC_AND_OPENSSL_SHA1 + toggle_sha1dc(git_config_bool(var, value)); +#else + warning("Ignoring core.enablesha1dc='%s'", value); +#endif + } + /* Add other config variables here and to Documentation/config.txt. */ return 0; } -- 2.12.1.windows.1