author | Linus Torvalds <torvalds@osdl.org> | |
Mon, 22 Jan 2007 06:26:41 +0000 (22:26 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 22 Jan 2007 07:35:47 +0000 (23:35 -0800) | ||
commit | 18af29f247f79b6fb61335f98a21daea67f5632f | |
tree | 64bfa10f911db22c2a973855d316f33d0e9b7098 | tree | snapshot |
parent | e3ff4b244726f89620201e3295f097cf00b6b502 | commit | diff |
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>
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 | diff | blob | history |