summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8da7149)
raw | patch | inline | side by side (parent: 8da7149)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 23 Aug 2006 21:31:20 +0000 (14:31 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 23 Aug 2006 21:31:20 +0000 (14:31 -0700) |
This fixes up merge-recursive.c for hashcpy/hashcmp changes.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
merge-recursive.c | patch | blob | history |
diff --git a/merge-recursive.c b/merge-recursive.c
index 8a2f69731e88198f7669343e7c96853fc24428f9..39a1eae894398cd235a1dfb643c523823670f656 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
{
if (!a && !b)
return 2;
- return a && b && memcmp(a, b, 20) == 0;
+ return a && b && hashcmp(a, b) == 0;
}
/*
remove_file(1, ren1_src);
- memcpy(src_other.sha1,
- ren1->src_entry->stages[stage].sha, 20);
+ hashcpy(src_other.sha1, ren1->src_entry->stages[stage].sha);
src_other.mode = ren1->src_entry->stages[stage].mode;
- memcpy(dst_other.sha1,
- ren1->dst_entry->stages[stage].sha, 20);
+ hashcpy(dst_other.sha1, ren1->dst_entry->stages[stage].sha);
dst_other.mode = ren1->dst_entry->stages[stage].mode;
try_merge = 0;
static unsigned char *has_sha(const unsigned char *sha)
{
- return memcmp(sha, null_sha1, 20) == 0 ? NULL: (unsigned char *)sha;
+ return is_null_sha1(sha) ? NULL: (unsigned char *)sha;
}
/* Per entry merge function */