Daniel Barkalow | 6eb8ae0 | 2005-04-18 11:39:48 -0700 | [diff] [blame] | 1 | #ifndef BLOB_H |
| 2 | #define BLOB_H |
| 3 | |
| 4 | #include "object.h" |
| 5 | |
| 6 | extern const char *blob_type; |
| 7 | |
| 8 | struct blob { |
| 9 | struct object object; |
| 10 | }; |
| 11 | |
Stefan Beller | 17126cd | 2018-06-28 18:22:08 -0700 | [diff] [blame] | 12 | struct blob *lookup_blob(struct repository *r, const struct object_id *oid); |
Daniel Barkalow | 6eb8ae0 | 2005-04-18 11:39:48 -0700 | [diff] [blame] | 13 | |
Daniel Barkalow | 837d395 | 2010-01-18 13:06:28 -0500 | [diff] [blame] | 14 | /** |
| 15 | * Blobs do not contain references to other objects and do not have |
| 16 | * structured data that needs parsing. However, code may use the |
| 17 | * "parsed" bit in the struct object for a blob to determine whether |
| 18 | * its content has been found to actually be available, so |
| 19 | * parse_blob_buffer() is used (by object.c) to flag that the object |
| 20 | * has been read successfully from the database. |
| 21 | **/ |
Jeff King | c1166ca | 2022-12-13 06:11:57 -0500 | [diff] [blame] | 22 | void parse_blob_buffer(struct blob *item); |
Daniel Barkalow | a510bfa | 2005-04-28 07:46:33 -0700 | [diff] [blame] | 23 | |
Daniel Barkalow | 6eb8ae0 | 2005-04-18 11:39:48 -0700 | [diff] [blame] | 24 | #endif /* BLOB_H */ |