1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-20 04:59:23 +02:00

fsck: fix broken loose object check.

When "git fsck" without --full found a loose object missing
because it was broken, it mistakenly thought it was not parsed
because we found it in one of the packs.  Back when this code
was written, we did not have a way to explicitly check if we
have the object in pack, but we do now.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2007-03-05 00:21:24 -08:00
parent 5ced057221
commit efec43c028

View File

@ -67,7 +67,7 @@ static void check_reachable_object(struct object *obj)
* do a full fsck
*/
if (!obj->parsed) {
if (has_sha1_file(obj->sha1))
if (has_sha1_pack(obj->sha1, NULL))
return; /* it is in pack - forget about it */
printf("missing %s %s\n", typename(obj->type), sha1_to_hex(obj->sha1));
return;