git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/7] config: add the core.enablesha1dc setting

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 24, 2017, 23:24 UTC
Message-ID
<7505e660d461f2a000bdb4d540346345186f42a8.1490397869.git.johannes.schindelin@gmx.de>
In-Reply-To
<cover.1490397869.git.johannes.schindelin@gmx.de>

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@gmx.de>
---
 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
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 8 of 23 in “PREVIEW: Introduce DC_AND_OPENSSL_SHA1 make flag”
  1. 0/7 PREVIEW: Introduce DC_AND_OPENSSL_SHA1 make flagJohannes Schindelin, Mar 24, 2017
  2. 1/7 sha1dc: safeguard against outside definitions of BIGENDIANJohannes Schindelin, Mar 24, 2017
  3. 2/7 Makefile: optionally compile with both SHA1DC and SHA1_OPENSSLJohannes Schindelin, Mar 24, 2017
  4. Ævar Arnfjörð BjarmasonMar 25, 2017
  5. Junio C HamanoMar 30, 2017
  6. Junio C HamanoMar 30, 2017
  7. Johannes SchindelinApr 18, 2017
  8. 3/7 config: add the core.enablesha1dc settingJohannes Schindelin, Mar 24, 2017
  9. 4/7 t0013: do not skip the entire file wholesale without DC_SHA1Johannes Schindelin, Mar 24, 2017
  10. 5/7 t0013: test DC_AND_OPENSSL_SHA1, tooJohannes Schindelin, Mar 24, 2017
  11. 6/7 mingw: enable DC_AND_OPENSSL_SHA1 by defaultJohannes Schindelin, Mar 24, 2017
  12. 7/7 p0013: new test to compare SHA1DC vs OpenSSLJohannes Schindelin, Mar 24, 2017
  13. Junio C HamanoMar 25, 2017
  14. Junio C HamanoMar 25, 2017
  15. Jeff KingMar 26, 2017
  16. Junio C HamanoMar 26, 2017
  17. Jeff KingMar 27, 2017
  18. Junio C HamanoMar 27, 2017
  19. Jeff KingMar 27, 2017
  20. Junio C HamanoMar 27, 2017
  21. Johannes SchindelinMar 29, 2017
  22. Junio C HamanoMar 30, 2017
  23. Johannes SchindelinApr 18, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.