]>
Commit | Line | Data |
---|---|---|
6eb8ae00 DB |
1 | #ifndef OBJECT_H |
2 | #define OBJECT_H | |
3 | ||
4 | struct object_list { | |
5 | struct object *item; | |
6 | struct object_list *next; | |
7 | }; | |
8 | ||
9 | struct object { | |
10 | unsigned parsed : 1; | |
11 | unsigned used : 1; | |
d1af002d | 12 | unsigned delta : 1; |
6eb8ae00 DB |
13 | unsigned int flags; |
14 | unsigned char sha1[20]; | |
15 | const char *type; | |
16 | struct object_list *refs; | |
d1af002d | 17 | struct object_list *attached_deltas; |
a3437b8c | 18 | void *util; |
6eb8ae00 DB |
19 | }; |
20 | ||
88355048 PB |
21 | extern int nr_objs; |
22 | extern struct object **objs; | |
6eb8ae00 | 23 | |
5d6ccf5c | 24 | struct object *lookup_object(const unsigned char *sha1); |
6eb8ae00 | 25 | |
5d6ccf5c | 26 | void created_object(const unsigned char *sha1, struct object *obj); |
6eb8ae00 | 27 | |
e9eefa67 | 28 | /** Returns the object, having parsed it to find out what it is. **/ |
5d6ccf5c | 29 | struct object *parse_object(const unsigned char *sha1); |
e9eefa67 | 30 | |
6eb8ae00 DB |
31 | void add_ref(struct object *refer, struct object *target); |
32 | ||
33 | void mark_reachable(struct object *obj, unsigned int mask); | |
34 | ||
35 | #endif /* OBJECT_H */ |