summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-07-18 16:00:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-18 19:14:47 (GMT)
commit14576df044be25b00d43aa24057d3abe4b9fd6f5 (patch)
tree616e8aed8402e7585c82f5d087552a214181afa9 /fast-import.c
parente929f515faaa44deed9057cdbaf8e44b3d855333 (diff)
downloadgit-14576df044be25b00d43aa24057d3abe4b9fd6f5.zip
git-14576df044be25b00d43aa24057d3abe4b9fd6f5.tar.gz
git-14576df044be25b00d43aa24057d3abe4b9fd6f5.tar.bz2
fast-import: use hashcmp() for SHA1 hash comparison
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index fa635f7..d73f58c 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;
}