X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=object.h;h=1bd59ac6fcf7798e02c2474e630c282f022eff10;hb=180926636e47ecfe28d03cec493af75899994f0f;hp=bc607fd55f6ce4e56ce87766369b5d4d55ec79af;hpb=b51ad4314078298194d23d46e2b4473ffd32a88a;p=git.git diff --git a/object.h b/object.h index bc607fd5..1bd59ac6 100644 --- a/object.h +++ b/object.h @@ -9,18 +9,28 @@ struct object_list { struct object { unsigned parsed : 1; unsigned used : 1; + unsigned delta : 1; unsigned int flags; unsigned char sha1[20]; const char *type; struct object_list *refs; + struct object_list *attached_deltas; + void *util; }; -int nr_objs; -struct object **objs; +extern int nr_objs; +extern struct object **objs; -struct object *lookup_object(unsigned char *sha1); +/** Internal only **/ +struct object *lookup_object(const unsigned char *sha1); -void created_object(unsigned char *sha1, struct object *obj); +/** Returns the object, having looked it up as being the given type. **/ +struct object *lookup_object_type(const unsigned char *sha1, const char *type); + +void created_object(const unsigned char *sha1, struct object *obj); + +/** Returns the object, having parsed it to find out what it is. **/ +struct object *parse_object(const unsigned char *sha1); void add_ref(struct object *refer, struct object *target);