- printf("unreferenced %s: %s\n", s->tag, sha1_to_hex(s->sha1));
- }
-}
-
-static void mark_needs_sha1(unsigned char *parent, const char * tag, unsigned char *child)
-{
- struct needs *n;
-
- if (nr_needs == alloc_needs) {
- alloc_needs = alloc_nr(alloc_needs);
- needs = realloc(needs, alloc_needs*sizeof(struct needs));
- }
- n = needs + nr_needs;
- nr_needs++;
- memcpy(n->parent, parent, 20);
- memcpy(n->needs, child, 20);
- strncpy(n->tag, tag, sizeof(n->tag));
-}
-
-static int mark_sha1_seen(unsigned char *sha1, char *tag)
-{
- struct seen *s;