summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 00703e6)
raw | patch | inline | side by side (parent: 00703e6)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 4 May 2006 04:17:45 +0000 (21:17 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 4 May 2006 04:17:45 +0000 (21:17 -0700) |
Even if trees are missing in cache-tree, we should continue and
check the rest of the object database.
Signed-off-by: Junio C Hamano <junkio@cox.net>
check the rest of the object database.
Signed-off-by: Junio C Hamano <junkio@cox.net>
fsck-objects.c | patch | blob | history |
diff --git a/fsck-objects.c b/fsck-objects.c
index 98421aab308086edc871001842dea1f8a06af71c..1922b6d84c51588b22553141f608c9a07182560b 100644 (file)
--- a/fsck-objects.c
+++ b/fsck-objects.c
if (0 <= it->entry_count) {
struct object *obj = parse_object(it->sha1);
+ if (!obj) {
+ error("%s: invalid sha1 pointer in cache-tree",
+ sha1_to_hex(it->sha1));
+ return 1;
+ }
mark_reachable(obj, REACHABLE);
obj->used = 1;
if (obj->type != tree_type)