X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=fsck.c;h=89278c1459d36a3e2b718661ca71483522f587fd;hb=5322ef2006cc93ad76140ff742cd96e74c1ec09b;hp=97f76c58155249412d7c59e965b564dfc0f75181;hpb=58066bec5a2cd8f5b6bb4884c8162364374ba0c1;p=thirdparty%2Fgit.git diff --git a/fsck.c b/fsck.c index 97f76c5815..89278c1459 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))