repository: introduce parsed objects field
[git/git.git] / blob.c
CommitLineData
175785e5 1#include "cache.h"
8f1d2e6f 2#include "blob.h"
175785e5
DB
3
4const char *blob_type = "blob";
5
3aca1fc6 6struct blob *lookup_blob(const struct object_id *oid)
175785e5 7{
3aca1fc6 8 struct object *obj = lookup_object(oid->hash);
100c5f3b 9 if (!obj)
3aca1fc6 10 return create_object(oid->hash, alloc_blob_node());
8ff226a9 11 return object_as_type(obj, OBJ_BLOB, 0);
175785e5 12}
a510bfaa 13
bd2c39f5
NP
14int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)
15{
16 item->object.parsed = 1;
17 return 0;
18}