object: allow lookup_object to handle arbitrary repositories
[git/git.git] / blob.h
CommitLineData
6eb8ae00
DB
1#ifndef BLOB_H
2#define BLOB_H
3
4#include "object.h"
5
6extern const char *blob_type;
7
8struct blob {
9 struct object object;
10};
11
da14a7ff
SB
12#define lookup_blob(r, o) lookup_blob_##r(o)
13struct blob *lookup_blob_the_repository(const struct object_id *oid);
6eb8ae00 14
bd2c39f5
NP
15int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size);
16
837d395a
DB
17/**
18 * Blobs do not contain references to other objects and do not have
19 * structured data that needs parsing. However, code may use the
20 * "parsed" bit in the struct object for a blob to determine whether
21 * its content has been found to actually be available, so
22 * parse_blob_buffer() is used (by object.c) to flag that the object
23 * has been read successfully from the database.
24 **/
a510bfaa 25
6eb8ae00 26#endif /* BLOB_H */