From 14576df044be25b00d43aa24057d3abe4b9fd6f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Scharfe?= Date: Fri, 18 Jul 2014 18:00:51 +0200 Subject: [PATCH] fast-import: use hashcmp() for SHA1 hash comparison Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- fast-import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast-import.c b/fast-import.c index fa635f75c3..d73f58cbe3 100644 --- a/fast-import.c +++ b/fast-import.c @@ -2324,7 +2324,7 @@ static void file_change_m(const char *p, struct branch *b) } /* Git does not track empty, non-toplevel directories. */ - if (S_ISDIR(mode) && !memcmp(sha1, EMPTY_TREE_SHA1_BIN, 20) && *p) { + if (S_ISDIR(mode) && !hashcmp(sha1, EMPTY_TREE_SHA1_BIN) && *p) { tree_content_remove(&b->branch_tree, p, NULL, 0); return; } -- 2.11.4.GIT