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>

René Scharfe committed Jul 18, 2014 at 18:00 UTC 14576df044be25b00d43aa24057d3abe4b9fd6f5
1 file changed +1 -1
fast-import.c
+1 -1
@@ -2324,7 +2324,7 @@ static void file_change_m(const char *p, struct branch *b)
2324 }
2325
2326 /* Git does not track empty, non-toplevel directories. */
2327 - if (S_ISDIR(mode) && !memcmp(sha1, EMPTY_TREE_SHA1_BIN, 20) && *p) {
2327 + if (S_ISDIR(mode) && !hashcmp(sha1, EMPTY_TREE_SHA1_BIN) && *p) {
2328 tree_content_remove(&b->branch_tree, p, NULL, 0);
2329 return;
2330 }