aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLars Hjemli2007-01-17 01:07:31 +0100
committerLars Hjemli2007-01-17 01:07:31 +0100
commit06c81d6faafff1c80bc9e2302e5b8fea393b775b (patch)
tree29f0e08e98110984299989f7abf80868793ea51d
parent66091f934a2d064ae55095cdc5ae008b43ea60fe (diff)
downloadcgit-06c81d6faafff1c80bc9e2302e5b8fea393b775b.tar
cgit-06c81d6faafff1c80bc9e2302e5b8fea393b775b.tar.gz
cgit-06c81d6faafff1c80bc9e2302e5b8fea393b775b.zip
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.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/git.h b/git.h
index b1e4828..991eaa5 100644
--- a/git.h
+++ b/git.h
@@ -124,6 +124,19 @@ static inline ssize_t xwrite(int fd, const void *buf, size_t len)
*/
+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
@@ -228,6 +241,8 @@ extern void free_grep_patterns(struct grep_opt *opt);
* from git:object.h
*/
+extern const char *type_names[9];
+
struct object_list {
struct object *item;
struct object_list *next;
@@ -344,6 +359,25 @@ 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);
+
+
+/*
* from git:diffcore.h
*/
ref='#n191'>191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291