9e64f301895e41fd457533245bcada66fea63668
1#include "cache.h"
2#include "blob.h"
3#include "repository.h"
4
5const char *blob_type = "blob";
6
7struct blob *lookup_blob(const struct object_id *oid)
8{
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);
14}
15
16int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)
17{
18 item->object.parsed = 1;
19 return 0;
20}