diff --git a/send-pack.c b/send-pack.c
index f7c0cfc6f67ba4d325ac6fc9f6c74fad78d1208e..fd79a61923ddc20af216ccd252e40bf38a70eccb 100644 (file)
--- a/send-pack.c
+++ b/send-pack.c
struct ref *ref;
int len = strlen(refname) + 1;
ref = xcalloc(1, sizeof(*ref) + len);
- memcpy(ref->new_sha1, sha1, 20);
+ hashcpy(ref->new_sha1, sha1);
memcpy(ref->name, refname, len);
*local_tail = ref;
local_tail = &ref->next;
continue;
}
}
- memcpy(ref->new_sha1, ref->peer_ref->new_sha1, 20);
+ hashcpy(ref->new_sha1, ref->peer_ref->new_sha1);
if (is_zero_sha1(ref->new_sha1)) {
error("cannot happen anymore");
ret = -3;