[PATCH] Prevent git-rev-list without --merge-order producing duplicates in output
[git/dscho.git] / object.h
blobca455d57117af5f15e83b791a336351b43af6716
1 #ifndef OBJECT_H
2 #define OBJECT_H
4 struct object_list {
5 struct object *item;
6 struct object_list *next;
7 };
9 struct object {
10 unsigned parsed : 1;
11 unsigned used : 1;
12 unsigned delta : 1;
13 unsigned int flags;
14 unsigned char sha1[20];
15 const char *type;
16 struct object_list *refs;
17 struct object_list *attached_deltas;
18 void *util;
21 extern int nr_objs;
22 extern struct object **objs;
24 struct object *lookup_object(const unsigned char *sha1);
26 void created_object(const unsigned char *sha1, struct object *obj);
28 /** Returns the object, having parsed it to find out what it is. **/
29 struct object *parse_object(const unsigned char *sha1);
31 void add_ref(struct object *refer, struct object *target);
33 void mark_reachable(struct object *obj, unsigned int mask);
35 #endif /* OBJECT_H */