From: Linus Torvalds Date: Fri, 8 Jul 2005 00:05:41 +0000 (-0700) Subject: git-fsck-cache: don't complain about lacking references when they are all in packs. X-Git-Tag: v0.99~30 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=659cacf5a9a2c7e0eed982e4684f84b47a3e2951;p=git.git git-fsck-cache: don't complain about lacking references when they are all in packs. We used to not count them at all, which then made us complain that there were no refs. --- diff --git a/fsck-cache.c b/fsck-cache.c index e42264e6c..48be6553a 100644 --- a/fsck-cache.c +++ b/fsck-cache.c @@ -312,8 +312,10 @@ static int fsck_handle_ref(const char *refname, const unsigned char *sha1) obj = lookup_object(sha1); if (!obj) { - if (!standalone && has_sha1_file(sha1)) + if (!standalone && has_sha1_file(sha1)) { + default_refs++; return 0; /* it is in a pack */ + } error("%s: invalid sha1 pointer %s", refname, sha1_to_hex(sha1)); /* We'll continue with the rest despite the error.. */ return 0;