Make sure leading directories exist when pushing refs.
[git/git.git] / object.h
CommitLineData
6eb8ae00
DB
1#ifndef OBJECT_H
2#define OBJECT_H
3
4struct object_list {
5 struct object *item;
6 struct object_list *next;
9ce43d1c 7 const char *name;
6eb8ae00
DB
8};
9
10struct object {
11 unsigned parsed : 1;
12 unsigned used : 1;
13 unsigned int flags;
14 unsigned char sha1[20];
15 const char *type;
16 struct object_list *refs;
a3437b8c 17 void *util;
6eb8ae00
DB
18};
19
88355048
PB
20extern int nr_objs;
21extern struct object **objs;
6eb8ae00 22
89e4202f 23/** Internal only **/
5d6ccf5c 24struct object *lookup_object(const unsigned char *sha1);
6eb8ae00 25
89e4202f
DB
26/** Returns the object, having looked it up as being the given type. **/
27struct object *lookup_object_type(const unsigned char *sha1, const char *type);
28
5d6ccf5c 29void created_object(const unsigned char *sha1, struct object *obj);
6eb8ae00 30
e9eefa67 31/** Returns the object, having parsed it to find out what it is. **/
5d6ccf5c 32struct object *parse_object(const unsigned char *sha1);
e9eefa67 33
6eb8ae00
DB
34void add_ref(struct object *refer, struct object *target);
35
36void mark_reachable(struct object *obj, unsigned int mask);
37
38#endif /* OBJECT_H */