mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'sb/object-store-alloc'
The conversion to pass "the_repository" and then "a_repository" throughout the object access API continues. * sb/object-store-alloc: alloc: allow arbitrary repositories for alloc functions object: allow create_object to handle arbitrary repositories object: allow grow_object_hash to handle arbitrary repositories alloc: add repository argument to alloc_commit_index alloc: add repository argument to alloc_report alloc: add repository argument to alloc_object_node alloc: add repository argument to alloc_tag_node alloc: add repository argument to alloc_commit_node alloc: add repository argument to alloc_tree_node alloc: add repository argument to alloc_blob_node object: add repository argument to grow_object_hash object: add repository argument to create_object repository: introduce parsed objects field
This commit is contained in:
4
tree.c
4
tree.c
@@ -5,6 +5,7 @@
|
||||
#include "blob.h"
|
||||
#include "commit.h"
|
||||
#include "tag.h"
|
||||
#include "alloc.h"
|
||||
#include "tree-walk.h"
|
||||
|
||||
const char *tree_type = "tree";
|
||||
@@ -196,7 +197,8 @@ struct tree *lookup_tree(const struct object_id *oid)
|
||||
{
|
||||
struct object *obj = lookup_object(oid->hash);
|
||||
if (!obj)
|
||||
return create_object(oid->hash, alloc_tree_node());
|
||||
return create_object(the_repository, oid->hash,
|
||||
alloc_tree_node(the_repository));
|
||||
return object_as_type(obj, OBJ_TREE, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user