summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-23 21:31:20 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-23 21:31:20 (GMT)
commit87cb004e4251722ca7b888f8b6c77335acb71a85 (patch)
tree95c709195f79ecd456e9fc02cff62c51f53bf137 /merge-recursive.c
parent8da714939458fed99ff750ca09d4169fe68b034e (diff)
downloadgit-87cb004e4251722ca7b888f8b6c77335acb71a85.zip
git-87cb004e4251722ca7b888f8b6c77335acb71a85.tar.gz
git-87cb004e4251722ca7b888f8b6c77335acb71a85.tar.bz2
hashcpy/hashcmp remaining bits.
This fixes up merge-recursive.c for hashcpy/hashcmp changes. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 8a2f697..39a1eae 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -56,7 +56,7 @@ static int sha_eq(const unsigned char *a, const unsigned char *b)
{
if (!a && !b)
return 2;
- return a && b && memcmp(a, b, 20) == 0;
+ return a && b && hashcmp(a, b) == 0;
}
/*
@@ -891,11 +891,9 @@ static int process_renames(struct path_list *a_renames,
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;
@@ -980,7 +978,7 @@ static int process_renames(struct path_list *a_renames,
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 */