return count++;
}
-void *alloc_commit_node(void)
+void *alloc_commit_node_the_repository(void)
{
struct commit *c = alloc_node(&commit_state, sizeof(struct commit));
c->object.type = OBJ_COMMIT;
read_cache();
time(&now);
- commit = alloc_commit_node();
+ commit = alloc_commit_node(the_repository);
commit->object.parsed = 1;
commit->date = now;
parent_tail = &commit->parents;
extern void *alloc_blob_node_the_repository(void);
#define alloc_tree_node(r) alloc_tree_node_##r()
extern void *alloc_tree_node_the_repository(void);
-extern void *alloc_commit_node(void);
+#define alloc_commit_node(r) alloc_commit_node_##r()
+extern void *alloc_commit_node_the_repository(void);
extern void *alloc_tag_node(void);
extern void *alloc_object_node(void);
extern void alloc_report(void);
struct object *obj = lookup_object(oid->hash);
if (!obj)
return create_object(the_repository, oid->hash,
- alloc_commit_node());
+ alloc_commit_node(the_repository));
return object_as_type(obj, OBJ_COMMIT, 0);
}
static struct commit *make_virtual_commit(struct tree *tree, const char *comment)
{
- struct commit *commit = alloc_commit_node();
+ struct commit *commit = alloc_commit_node(the_repository);
set_merge_remote_desc(commit, comment, (struct object *)commit);
commit->tree = tree;