diff --git a/builtin-update-index.c b/builtin-update-index.c
index 9f0cf28ba2dde7c5000029107460a3f4ca873aa3..5dd91af180df0f832ecc747050ad5306efe9c8b6 100644 (file)
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
ret = -1;
goto free_return;
}
- if (!memcmp(ce_2->sha1, ce_3->sha1, 20) &&
+ if (!hashcmp(ce_2->sha1, ce_3->sha1) &&
ce_2->ce_mode == ce_3->ce_mode) {
fprintf(stderr, "%s: identical in both, skipping.\n",
path);
old = read_one_ent(NULL, head_sha1,
ce->name, ce_namelen(ce), 0);
if (old && ce->ce_mode == old->ce_mode &&
- !memcmp(ce->sha1, old->sha1, 20)) {
+ !hashcmp(ce->sha1, old->sha1)) {
free(old);
continue; /* unchanged */
}