Merge branch 'jc/skip-test-in-the-middle'
[gitweb.git] / bundle.c
index 6e181bb3d851fc7178aa10a4b2a5a0a592de9285..d15db03c84556af8a47783f4d4ee76379d721020 100644 (file)
--- a/bundle.c
+++ b/bundle.c
@@ -142,7 +142,7 @@ int verify_bundle(struct bundle_header *header, int verbose)
        init_revisions(&revs, NULL);
        for (i = 0; i < p->nr; i++) {
                struct ref_list_entry *e = p->list + i;
-               struct object *o = parse_object(e->oid.hash);
+               struct object *o = parse_object(&e->oid);
                if (o) {
                        o->flags |= PREREQ_MARK;
                        add_pending_object(&revs, o, e->name);
@@ -212,7 +212,7 @@ static int is_tag_in_date_range(struct object *tag, struct rev_info *revs)
        unsigned long size;
        enum object_type type;
        char *buf = NULL, *line, *lineend;
-       unsigned long date;
+       timestamp_t date;
        int result = 1;
 
        if (revs->max_age == -1 && revs->min_age == -1)
@@ -228,7 +228,7 @@ static int is_tag_in_date_range(struct object *tag, struct rev_info *revs)
        line = memchr(line, '>', lineend ? lineend - line : buf + size - line);
        if (!line++)
                goto out;
-       date = strtoul(line, NULL, 10);
+       date = parse_timestamp(line, NULL, 10);
        result = (revs->max_age == -1 || revs->max_age < date) &&
                (revs->min_age == -1 || revs->min_age > date);
 out:
@@ -290,12 +290,14 @@ static int compute_and_write_prerequisites(int bundle_fd,
                if (buf.len > 0 && buf.buf[0] == '-') {
                        write_or_die(bundle_fd, buf.buf, buf.len);
                        if (!get_oid_hex(buf.buf + 1, &oid)) {
-                               struct object *object = parse_object_or_die(oid.hash, buf.buf);
+                               struct object *object = parse_object_or_die(&oid,
+                                                                           buf.buf);
                                object->flags |= UNINTERESTING;
                                add_pending_object(revs, object, buf.buf);
                        }
                } else if (!get_oid_hex(buf.buf, &oid)) {
-                       struct object *object = parse_object_or_die(oid.hash, buf.buf);
+                       struct object *object = parse_object_or_die(&oid,
+                                                                   buf.buf);
                        object->flags |= SHOWN;
                }
        }
@@ -367,7 +369,7 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
                         * in terms of a tag (e.g. v2.0 from the range
                         * "v1.0..v2.0")?
                         */
-                       struct commit *one = lookup_commit_reference(oid.hash);
+                       struct commit *one = lookup_commit_reference(&oid);
                        struct object *obj;
 
                        if (e->item == &(one->object)) {
@@ -379,7 +381,7 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
                                 * end up triggering "empty bundle"
                                 * error.
                                 */
-                               obj = parse_object_or_die(oid.hash, e->name);
+                               obj = parse_object_or_die(&oid, e->name);
                                obj->flags |= SHOWN;
                                add_pending_object(revs, obj, e->name);
                        }