diff options
| author | 2007-01-17 09:07:31 (JST) | |
|---|---|---|
| committer | 2007-01-17 09:07:31 (JST) | |
| commit | 06c81d6faafff1c80bc9e2302e5b8fea393b775b (patch) | |
| tree | 29f0e08e98110984299989f7abf80868793ea51d | |
| parent | 66091f934a2d064ae55095cdc5ae008b43ea60fe (diff) | |
| download | cgit-06c81d6faafff1c80bc9e2302e5b8fea393b775b.zip cgit-06c81d6faafff1c80bc9e2302e5b8fea393b775b.tar.gz | |
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>
| -rw-r--r-- | git.h | 34 |
1 files changed, 34 insertions, 0 deletions
| @@ -124,6 +124,19 @@ static inline ssize_t xwrite(int fd, const void *buf, size_t len) | |||
| 124 | */ | 124 | */ |
| 125 | 125 | ||
| 126 | 126 | ||
| 127 | enum object_type { | ||
| 128 | OBJ_NONE = 0, | ||
| 129 | OBJ_COMMIT = 1, | ||
| 130 | OBJ_TREE = 2, | ||
| 131 | OBJ_BLOB = 3, | ||
| 132 | OBJ_TAG = 4, | ||
| 133 | /* 5 for future expansion */ | ||
| 134 | OBJ_OFS_DELTA = 6, | ||
| 135 | OBJ_REF_DELTA = 7, | ||
| 136 | OBJ_BAD, | ||
| 137 | }; | ||
| 138 | |||
| 139 | |||
| 127 | /* Convert to/from hex/sha1 representation */ | 140 | /* Convert to/from hex/sha1 representation */ |
| 128 | #define MINIMUM_ABBREV 4 | 141 | #define MINIMUM_ABBREV 4 |
| 129 | #define DEFAULT_ABBREV 7 | 142 | #define DEFAULT_ABBREV 7 |
| @@ -228,6 +241,8 @@ extern void free_grep_patterns(struct grep_opt *opt); | |||
| 228 | * from git:object.h | 241 | * from git:object.h |
| 229 | */ | 242 | */ |
| 230 | 243 | ||
| 244 | extern const char *type_names[9]; | ||
| 245 | |||
| 231 | struct object_list { | 246 | struct object_list { |
| 232 | struct object *item; | 247 | struct object *item; |
| 233 | struct object_list *next; | 248 | struct object_list *next; |
| @@ -344,6 +359,25 @@ typedef void* (*topo_sort_get_fn_t)(struct commit*); | |||
| 344 | 359 | ||
| 345 | 360 | ||
| 346 | /* | 361 | /* |
| 362 | * from git:tag.h | ||
| 363 | */ | ||
| 364 | |||
| 365 | extern const char *tag_type; | ||
| 366 | |||
| 367 | struct tag { | ||
| 368 | struct object object; | ||
| 369 | struct object *tagged; | ||
| 370 | char *tag; | ||
| 371 | char *signature; /* not actually implemented */ | ||
| 372 | }; | ||
| 373 | |||
| 374 | extern struct tag *lookup_tag(const unsigned char *sha1); | ||
| 375 | extern int parse_tag_buffer(struct tag *item, void *data, unsigned long size); | ||
| 376 | extern int parse_tag(struct tag *item); | ||
| 377 | extern struct object *deref_tag(struct object *, const char *, int); | ||
| 378 | |||
| 379 | |||
| 380 | /* | ||
| 347 | * from git:diffcore.h | 381 | * from git:diffcore.h |
| 348 | */ | 382 | */ |
| 349 | 383 | ||
