all repos — cgit @ 06c81d6faafff1c80bc9e2302e5b8fea393b775b

a hyperfast web frontend for git written in c

Add some more decls from git (cache.h, tag.h)

This is in preparation for extended tag support in cgit

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Wed, 17 Jan 2007 01:07:31 +0100
commit

06c81d6faafff1c80bc9e2302e5b8fea393b775b

parent

66091f934a2d064ae55095cdc5ae008b43ea60fe

1 files changed, 34 insertions(+), 0 deletions(-)

jump to
M git.hgit.h

@@ -124,6 +124,19 @@ * from git:cache.h

*/ +enum object_type { + OBJ_NONE = 0, + OBJ_COMMIT = 1, + OBJ_TREE = 2, + OBJ_BLOB = 3, + OBJ_TAG = 4, + /* 5 for future expansion */ + OBJ_OFS_DELTA = 6, + OBJ_REF_DELTA = 7, + OBJ_BAD, +}; + + /* Convert to/from hex/sha1 representation */ #define MINIMUM_ABBREV 4 #define DEFAULT_ABBREV 7

@@ -227,6 +240,8 @@

/* * from git:object.h */ + +extern const char *type_names[9]; struct object_list { struct object *item;

@@ -341,6 +356,25 @@

typedef void (*topo_sort_set_fn_t)(struct commit*, void *data); typedef void* (*topo_sort_get_fn_t)(struct commit*); + + +/* + * from git:tag.h + */ + +extern const char *tag_type; + +struct tag { + struct object object; + struct object *tagged; + char *tag; + char *signature; /* not actually implemented */ +}; + +extern struct tag *lookup_tag(const unsigned char *sha1); +extern int parse_tag_buffer(struct tag *item, void *data, unsigned long size); +extern int parse_tag(struct tag *item); +extern struct object *deref_tag(struct object *, const char *, int); /*