object.hon commit [PATCH] Use SHA1 for git-update-cache --refresh (69a97f1)
   1#ifndef OBJECT_H
   2#define OBJECT_H
   3
   4struct object_list {
   5        struct object *item;
   6        struct object_list *next;
   7        const char *name;
   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;
  17        void *util;
  18};
  19
  20extern int nr_objs;
  21extern struct object **objs;
  22
  23/** Internal only **/
  24struct object *lookup_object(const unsigned char *sha1);
  25
  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
  29void created_object(const unsigned char *sha1, struct object *obj);
  30
  31/** Returns the object, having parsed it to find out what it is. **/
  32struct object *parse_object(const unsigned char *sha1);
  33
  34void add_ref(struct object *refer, struct object *target);
  35
  36void mark_reachable(struct object *obj, unsigned int mask);
  37
  38#endif /* OBJECT_H */