index ca800a85f771be1bd10d6575d93ca05bd3fc381c..aa55ddb6846bdc33abf9d41424d105e1b2331640 100644 (file)
--- a/tree.c
+++ b/tree.c
ret->object.type = tree_type;
return ret;
}
+ if (!obj->type)
+ obj->type = tree_type;
if (obj->type != tree_type) {
error("Object %s is a %s, not a tree",
sha1_to_hex(sha1), obj->type);
}
if (obj)
add_ref(&item->object, obj);
-
+ entry->parent = NULL; /* needs to be filled by the user */
*list_p = entry;
list_p = &entry->next;
}