Skip to content

Commit 14576df

Browse files
rscharfegitster
authored andcommitted
fast-import: use hashcmp() for SHA1 hash comparison
Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e929f51 commit 14576df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fast-import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,7 @@ static void file_change_m(const char *p, struct branch *b)
23242324
}
23252325

23262326
/* 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) {
23282328
tree_content_remove(&b->branch_tree, p, NULL, 0);
23292329
return;
23302330
}

0 commit comments

Comments
 (0)