{"thread":{"id":"7086","subject":"[PATCH 1/3] fsck: fix broken loose object check.","startedAt":"2007-03-05T08:21:24Z","lastAt":"2007-03-05T08:21:24Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"36291","messageId":"7v3b4k2j97.fsf@assigned-by-dhcp.cox.net","threadId":"7086","inReplyTo":null,"subject":"[PATCH 1/3] fsck: fix broken loose object check.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-05T08:21:24Z","receivedAt":"2007-03-05T08:21:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When \"git fsck\" without --full found a loose object missing\nbecause it was broken, it mistakenly thought it was not parsed\nbecause we found it in one of the packs.  Back when this code\nwas written, we did not have a way to explicitly check if we\nhave the object in pack, but we do now.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n builtin-fsck.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-fsck.c b/builtin-fsck.c\nindex 6abf498..abdd0f2 100644\n--- a/builtin-fsck.c\n+++ b/builtin-fsck.c\n@@ -67,7 +67,7 @@ static void check_reachable_object(struct object *obj)\n \t * do a full fsck\n \t */\n \tif (!obj->parsed) {\n-\t\tif (has_sha1_file(obj->sha1))\n+\t\tif (has_sha1_pack(obj->sha1, NULL))\n \t\t\treturn; /* it is in pack - forget about it */\n \t\tprintf(\"missing %s %s\\n\", typename(obj->type), sha1_to_hex(obj->sha1));\n \t\treturn;\n-- \n1.5.0.3.855.ga3b2\n"}]}