fsck-objects: refactor checking for connectivity
commit18af29f247f79b6fb61335f98a21daea67f5632f
authorLinus Torvalds <torvalds@osdl.org>
Mon, 22 Jan 2007 06:26:41 +0000 (21 22:26 -0800)
committerJunio C Hamano <junkio@cox.net>
Mon, 22 Jan 2007 07:35:47 +0000 (21 23:35 -0800)
tree64bfa10f911db22c2a973855d316f33d0e9b7098
parente3ff4b244726f89620201e3295f097cf00b6b502
fsck-objects: refactor checking for connectivity

This separates the connectivity check into separate codepaths,
one for reachable objects and the other for unreachable ones,
while adding a lot of comments to explain what is going on.

When checking an unreachable object, unlike a reachable one, we
do not have to complain if it does not exist (we used to
complain about a missing blob even when the only thing that
references it is a tree that is dangling).  Also we do not have
to check and complain about objects that are referenced by an
unreachable object.

This makes the messages from fsck-objects a lot less noisy and
more useful.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
fsck-objects.c