-static struct object_entry* new_object(unsigned char *sha1)
-{
- if (pool_next != pool_end) {
- struct object_entry *e = pool_next++;
- memcpy(e->sha1, sha1, sizeof(e->sha1));
- return e;
- } else {
- struct overflow_object_entry *e;
-
- e = xmalloc(sizeof(struct overflow_object_entry));
- e->next = overflow;
- memcpy(e->oe.sha1, sha1, sizeof(e->oe.sha1));
- overflow = e;
- overflow_count++;
- return &e->oe;
- }
+ e = blocks->next_free++;
+ memcpy(e->sha1, sha1, sizeof(e->sha1));
+ return e;