packed_ref_store: implement reference transactions
[git/debian.git] / blob.c
blobfa2ab4f7a74e501366e1d3ceca9285ae60606165
1 #include "cache.h"
2 #include "blob.h"
4 const char *blob_type = "blob";
6 struct blob *lookup_blob(const struct object_id *oid)
8 struct object *obj = lookup_object(oid->hash);
9 if (!obj)
10 return create_object(oid->hash, alloc_blob_node());
11 return object_as_type(obj, OBJ_BLOB, 0);
14 int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)
16 item->object.parsed = 1;
17 return 0;