pkt-line: fix packet_read_line() to handle len < 0 errors
[gitweb.git] / reflog-walk.c
index fe5be41471983086a7d3b00c85b0a77891904641..99679f58255e386526335da8342e17356b48a4f9 100644 (file)
@@ -19,7 +19,7 @@ struct complete_reflogs {
        int nr, alloc;
 };
 
-static int read_one_reflog(unsigned char *osha1, unsigned char *nsha1,
+static int read_one_reflog(struct object_id *ooid, struct object_id *noid,
                const char *email, unsigned long timestamp, int tz,
                const char *message, void *cb_data)
 {
@@ -28,8 +28,8 @@ static int read_one_reflog(unsigned char *osha1, unsigned char *nsha1,
 
        ALLOC_GROW(array->items, array->nr + 1, array->alloc);
        item = array->items + array->nr;
-       hashcpy(item->ooid.hash, osha1);
-       hashcpy(item->noid.hash, nsha1);
+       oidcpy(&item->ooid, ooid);
+       oidcpy(&item->noid, noid);
        item->email = xstrdup(email);
        item->timestamp = timestamp;
        item->tz = tz;