Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sha1dc
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-03-17 01:08:49 +0300
committerJunio C Hamano <gitster@pobox.com>2017-03-17 01:16:45 +0300
commitc0c20060af3dfc55258e0b9168e0d9c564b5bdfd (patch)
tree018a9b4398e3e4de09a8c088cc1478cdb561598e /sha1dc
parent45a574eec82424ac11c4c5fe117725597309b9c9 (diff)
sha1dc: disable safe_hash feature
The safe_hash feature is designed to make sha1dc a drop-in replacement for sha1, where colliding entries will get a permuted hash to un-collide them. However, since we're handling the collision case ourselves, this isn't helpful (and is actually harmful, as it means you get the wrong object id if you want to show it in a log message). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1dc')
-rw-r--r--sha1dc/sha1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
index d25d93abd8..8ff2321dfb 100644
--- a/sha1dc/sha1.c
+++ b/sha1dc/sha1.c
@@ -1661,7 +1661,7 @@ void SHA1DCInit(SHA1_CTX* ctx)
ctx->ihv[3] = 0x10325476;
ctx->ihv[4] = 0xC3D2E1F0;
ctx->found_collision = 0;
- ctx->safe_hash = 1;
+ ctx->safe_hash = 0;
ctx->ubc_check = 1;
ctx->detect_coll = 1;
ctx->reduced_round_coll = 0;