blob: 1664872055783557e1836dcc64bc2f51c20c5b4f [file] [log] [blame]
Daniel Barkalow6eb8ae02005-04-18 11:39:48 -07001#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
Stefan Beller17126cd2018-06-28 18:22:08 -070012struct blob *lookup_blob(struct repository *r, const struct object_id *oid);
Daniel Barkalow6eb8ae02005-04-18 11:39:48 -070013
Nicolas Pitrebd2c39f2005-05-06 13:48:34 -040014int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size);
15
Daniel Barkalow837d3952010-01-18 13:06:28 -050016/**
17 * Blobs do not contain references to other objects and do not have
18 * structured data that needs parsing. However, code may use the
19 * "parsed" bit in the struct object for a blob to determine whether
20 * its content has been found to actually be available, so
21 * parse_blob_buffer() is used (by object.c) to flag that the object
22 * has been read successfully from the database.
23 **/
Daniel Barkalowa510bfa2005-04-28 07:46:33 -070024
Daniel Barkalow6eb8ae02005-04-18 11:39:48 -070025#endif /* BLOB_H */