Skip to content

Commit

Permalink
fsck: fix broken loose object check.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Mar 5, 2007
1 parent 5ced057 commit efec43c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit efec43c

Please sign in to comment.