Jeff King | a941d5e | 2010-04-01 20:07:40 -0400 | [diff] [blame] | 1 | #ifndef NOTES_CACHE_H |
| 2 | #define NOTES_CACHE_H |
| 3 | |
| 4 | #include "notes.h" |
| 5 | |
Nguyễn Thái Ngọc Duy | bd7ad45 | 2018-11-10 06:49:06 +0100 | [diff] [blame] | 6 | struct repository; |
| 7 | |
Jeff King | a941d5e | 2010-04-01 20:07:40 -0400 | [diff] [blame] | 8 | struct notes_cache { |
| 9 | struct notes_tree tree; |
| 10 | char *validity; |
| 11 | }; |
| 12 | |
Nguyễn Thái Ngọc Duy | bd7ad45 | 2018-11-10 06:49:06 +0100 | [diff] [blame] | 13 | void notes_cache_init(struct repository *r, struct notes_cache *c, |
| 14 | const char *name, const char *validity); |
Jeff King | a941d5e | 2010-04-01 20:07:40 -0400 | [diff] [blame] | 15 | int notes_cache_write(struct notes_cache *c); |
| 16 | |
brian m. carlson | 569aa37 | 2017-05-06 22:09:58 +0000 | [diff] [blame] | 17 | char *notes_cache_get(struct notes_cache *c, struct object_id *oid, size_t |
Jeff King | a941d5e | 2010-04-01 20:07:40 -0400 | [diff] [blame] | 18 | *outsize); |
brian m. carlson | 569aa37 | 2017-05-06 22:09:58 +0000 | [diff] [blame] | 19 | int notes_cache_put(struct notes_cache *c, struct object_id *oid, |
Jeff King | a941d5e | 2010-04-01 20:07:40 -0400 | [diff] [blame] | 20 | const char *data, size_t size); |
| 21 | |
| 22 | #endif /* NOTES_CACHE_H */ |