summaryrefslogtreecommitdiff
path: root/builtin-fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-03-05 08:21:24 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-05 08:55:19 (GMT)
commitefec43c028c52bc252afdaa586b46f83186d3eaa (patch)
treed1a7ee7c5224b049e330d610e4c296c7cd3d923a /builtin-fsck.c
parent5ced0572217f82f20c4a3460492768e07c08aeea (diff)
downloadgit-efec43c028c52bc252afdaa586b46f83186d3eaa.zip
git-efec43c028c52bc252afdaa586b46f83186d3eaa.tar.gz
git-efec43c028c52bc252afdaa586b46f83186d3eaa.tar.bz2
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>
Diffstat (limited to 'builtin-fsck.c')
-rw-r--r--builtin-fsck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-fsck.c b/builtin-fsck.c
index 6abf498..abdd0f2 100644
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
@@ -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;