Merge branch 'ab/grep-preparatory-cleanup' into sb/submodule-blanket-recursive
[gitweb.git] / fsck.c
diff --git a/fsck.c b/fsck.c
index 24daedd6cc0733c43eaf017eed65c3ecccd4c962..d589341cddfa2b76bc8c5ee0f66a6b745883126b 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -132,7 +132,7 @@ static int fsck_msg_type(enum fsck_msg_id msg_id,
 
 static void init_skiplist(struct fsck_options *options, const char *path)
 {
-       static struct sha1_array skiplist = SHA1_ARRAY_INIT;
+       static struct oid_array skiplist = OID_ARRAY_INIT;
        int sorted, fd;
        char buffer[GIT_MAX_HEXSZ + 1];
        struct object_id oid;
@@ -156,7 +156,7 @@ static void init_skiplist(struct fsck_options *options, const char *path)
                        break;
                if (parse_oid_hex(buffer, &oid, &p) || *p != '\n')
                        die("Invalid SHA-1: %s", buffer);
-               sha1_array_append(&skiplist, &oid);
+               oid_array_append(&skiplist, &oid);
                if (sorted && skiplist.nr > 1 &&
                                oidcmp(&skiplist.oid[skiplist.nr - 2],
                                       &oid) > 0)
@@ -280,7 +280,7 @@ static int report(struct fsck_options *options, struct object *object,
                return 0;
 
        if (options->skiplist && object &&
-                       sha1_array_lookup(options->skiplist, &object->oid) >= 0)
+                       oid_array_lookup(options->skiplist, &object->oid) >= 0)
                return 0;
 
        if (msg_type == FSCK_FATAL)
@@ -691,7 +691,7 @@ static int fsck_ident(const char **ident, struct object *obj, struct fsck_option
        p++;
        if (*p == '0' && p[1] != ' ')
                return report(options, obj, FSCK_MSG_ZERO_PADDED_DATE, "invalid author/committer line - zero-padded date");
-       if (date_overflows(strtoul(p, &end, 10)))
+       if (date_overflows(parse_timestamp(p, &end, 10)))
                return report(options, obj, FSCK_MSG_BAD_DATE_OVERFLOW, "invalid author/committer line - date causes integer overflow");
        if ((end == p || *end != ' '))
                return report(options, obj, FSCK_MSG_BAD_DATE, "invalid author/committer line - bad date");