diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2015-11-10 02:22:20 +0000 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 08:02:05 -0500 |
commit | f4e54d02b894064d370e461385b48701485672bd (patch) | |
tree | c6e25d995009bbe422f87a2da72ed5d5b2098ced /send-pack.c | |
parent | b419aa25d5622268f515b26e76420eb2dd89e7e6 (diff) | |
download | git-f4e54d02b894064d370e461385b48701485672bd.tar.gz |
Convert struct ref to use object_id.
Use struct object_id in three fields in struct ref and convert all the
necessary places that use it.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'send-pack.c')
-rw-r--r-- | send-pack.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/send-pack.c b/send-pack.c index c6a4030738..047bd18fde 100644 --- a/send-pack.c +++ b/send-pack.c @@ -102,11 +102,11 @@ static int pack_objects(int fd, struct ref *refs, struct sha1_array *extra, stru break; while (refs) { - if (!is_null_sha1(refs->old_sha1) && - !feed_object(refs->old_sha1, po.in, 1)) + if (!is_null_oid(&refs->old_oid) && + !feed_object(refs->old_oid.hash, po.in, 1)) break; - if (!is_null_sha1(refs->new_sha1) && - !feed_object(refs->new_sha1, po.in, 0)) + if (!is_null_oid(&refs->new_oid) && + !feed_object(refs->new_oid.hash, po.in, 0)) break; refs = refs->next; } @@ -284,8 +284,8 @@ static int generate_push_cert(struct strbuf *req_buf, continue; update_seen = 1; strbuf_addf(&cert, "%s %s %s\n", - sha1_to_hex(ref->old_sha1), - sha1_to_hex(ref->new_sha1), + oid_to_hex(&ref->old_oid), + oid_to_hex(&ref->new_oid), ref->name); } if (!update_seen) @@ -487,8 +487,8 @@ int send_pack(struct send_pack_args *args, if (check_to_send_update(ref, args) < 0) continue; - old_hex = sha1_to_hex(ref->old_sha1); - new_hex = sha1_to_hex(ref->new_sha1); + old_hex = oid_to_hex(&ref->old_oid); + new_hex = oid_to_hex(&ref->new_oid); if (!cmds_sent) { packet_buf_write(&req_buf, "%s %s %s%c%s", |