Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fast-import: use hashcmp() for SHA1 hash comparison
Browse files Browse the repository at this point in the history
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
rscharfe authored and gitster committed Jul 18, 2014
1 parent e929f51 commit 14576df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fast-import.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 14576df

Please sign in to comment.