alloc: add repository argument to alloc_tag_node
[git.git] / blob.c
blob9e64f301895e41fd457533245bcada66fea63668
1 #include "cache.h"
2 #include "blob.h"
3 #include "repository.h"
5 const char *blob_type = "blob";
7 struct blob *lookup_blob(const struct object_id *oid)
9 struct object *obj = lookup_object(oid->hash);
10 if (!obj)
11 return create_object(the_repository, oid->hash,
12 alloc_blob_node(the_repository));
13 return object_as_type(obj, OBJ_BLOB, 0);
16 int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)
18 item->object.parsed = 1;
19 return 0;