send_ref(): convert local variable "peeled" to object_id
[gitweb.git] / upload-pack.c
index 929284f050fa6df444497f43487905dccfb521d3..1cb9a948aa05ac4ba274c1e729e64bdf09c483ea 100644 (file)
@@ -717,7 +717,7 @@ static int send_ref(const char *refname, const struct object_id *oid,
                " side-band-64k ofs-delta shallow no-progress"
                " include-tag multi_ack_detailed";
        const char *refname_nons = strip_namespace(refname);
-       unsigned char peeled[20];
+       struct object_id peeled;
 
        if (mark_our_ref(refname, oid))
                return 0;
@@ -738,8 +738,8 @@ static int send_ref(const char *refname, const struct object_id *oid,
                packet_write(1, "%s %s\n", oid_to_hex(oid), refname_nons);
        }
        capabilities = NULL;
-       if (!peel_ref(refname, peeled))
-               packet_write(1, "%s %s^{}\n", sha1_to_hex(peeled), refname_nons);
+       if (!peel_ref(refname, peeled.hash))
+               packet_write(1, "%s %s^{}\n", oid_to_hex(&peeled), refname_nons);
        return 0;
 }