[PATCH] git-ssh-pull: commit-id consistency
[git.git] / object.h
blob9ad4ae83e12ab84c94eacfa3a8db1bd01e987c2a
1 #ifndef OBJECT_H
2 #define OBJECT_H
4 struct object_list {
5 struct object *item;
6 struct object_list *next;
7 const char *name;
8 };
10 struct object {
11 unsigned parsed : 1;
12 unsigned used : 1;
13 unsigned delta : 1;
14 unsigned int flags;
15 unsigned char sha1[20];
16 const char *type;
17 struct object_list *refs;
18 struct object_list *attached_deltas;
19 void *util;
22 extern int nr_objs;
23 extern struct object **objs;
25 /** Internal only **/
26 struct object *lookup_object(const unsigned char *sha1);
28 /** Returns the object, having looked it up as being the given type. **/
29 struct object *lookup_object_type(const unsigned char *sha1, const char *type);
31 void created_object(const unsigned char *sha1, struct object *obj);
33 /** Returns the object, having parsed it to find out what it is. **/
34 struct object *parse_object(const unsigned char *sha1);
36 void add_ref(struct object *refer, struct object *target);
38 void mark_reachable(struct object *obj, unsigned int mask);
40 #endif /* OBJECT_H */