[PATCH] ls-tree for listing trees
[git.git] / fsck-cache.c
index 5dca6db..bb5cf19 100644 (file)
@@ -69,6 +69,7 @@ static void check_connectivity(void)
                if (lookup_seen(n->needs, n->tag))
                        continue;
                strcpy(hex, sha1_to_hex(n->parent));
+               printf("missing %s: %s referenced by %s\n", n->tag, sha1_to_hex(n->needs), hex);
        }
 
        /* Tell the user about things not referenced.. */
@@ -105,7 +106,7 @@ static int mark_sha1_seen(unsigned char *sha1, char *tag)
                seen = realloc(seen, alloc_seen*sizeof(struct seen));
        }
        s = seen + nr_seen;
-       memset(s, 0, sizeof(s));
+       memset(s, 0, sizeof(*s));
        nr_seen++;
        memcpy(s->sha1, sha1, 20);
        strncpy(s->tag, tag, sizeof(s->tag));