summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fsck-cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fsck-cache.c b/fsck-cache.c
index e42264e6ce..48be6553a3 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;