X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fsck.c;h=89278c1459d36a3e2b718661ca71483522f587fd;hb=a2c6bf0e7661a4e6eafe7810cca1cd08187d311f;hp=97f76c58155249412d7c59e965b564dfc0f75181;hpb=0d5055665ca1e76659ffa96bf972b4b0125ea069;p=~andy%2Fgit diff --git a/fsck.c b/fsck.c index 97f76c581..89278c145 100644 --- a/fsck.c +++ b/fsck.c @@ -148,20 +148,17 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) struct tree_desc desc; unsigned o_mode; const char *o_name; - const unsigned char *o_sha1; init_tree_desc(&desc, item->buffer, item->size); o_mode = 0; o_name = NULL; - o_sha1 = NULL; while (desc.size) { unsigned mode; const char *name; - const unsigned char *sha1; - sha1 = tree_entry_extract(&desc, &name, &mode); + tree_entry_extract(&desc, &name, &mode); if (strchr(name, '/')) has_full_path = 1; @@ -207,7 +204,6 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func) o_mode = mode; o_name = name; - o_sha1 = sha1; } retval = 0; @@ -233,7 +229,7 @@ static int fsck_commit(struct commit *commit, fsck_error error_func) struct commit_graft *graft; int parents = 0; - if (!commit->date) + if (commit->date == ULONG_MAX) return error_func(&commit->object, FSCK_ERROR, "invalid author/committer line"); if (memcmp(buffer, "tree ", 5))