author | Lars Hjemli <hjemli@gmail.com> | 2007-02-04 21:55:19 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-02-04 21:55:19 (UTC) |
commit | 8fb2f056961e577a039ae185d89ab8e2d2840b9e (patch) (unidiff) | |
tree | a009aca3c52dd134faa48181daede79bd930f9a4 /git.h | |
parent | ce1c7336e5b3e3ebe8f8c9029c405aedec98c208 (diff) | |
download | cgit-8fb2f056961e577a039ae185d89ab8e2d2840b9e.zip cgit-8fb2f056961e577a039ae185d89ab8e2d2840b9e.tar.gz cgit-8fb2f056961e577a039ae185d89ab8e2d2840b9e.tar.bz2 |
Add support for lightweight tags
There is nothing bad about a tag that has no tag-object, but the old code
didn't handle such tags correctly. Fix it.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | git.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -269,24 +269,28 @@ struct object_array { | |||
269 | /* | 269 | /* |
270 | * The object type is stored in 3 bits. | 270 | * The object type is stored in 3 bits. |
271 | */ | 271 | */ |
272 | struct object { | 272 | struct object { |
273 | unsigned parsed : 1; | 273 | unsigned parsed : 1; |
274 | unsigned used : 1; | 274 | unsigned used : 1; |
275 | unsigned type : TYPE_BITS; | 275 | unsigned type : TYPE_BITS; |
276 | unsigned flags : FLAG_BITS; | 276 | unsigned flags : FLAG_BITS; |
277 | unsigned char sha1[20]; | 277 | unsigned char sha1[20]; |
278 | }; | 278 | }; |
279 | 279 | ||
280 | 280 | ||
281 | /** Returns the object, having parsed it to find out what it is. **/ | ||
282 | struct object *parse_object(const unsigned char *sha1); | ||
283 | |||
284 | |||
281 | /* | 285 | /* |
282 | * from git:tree.h | 286 | * from git:tree.h |
283 | */ | 287 | */ |
284 | 288 | ||
285 | struct tree { | 289 | struct tree { |
286 | struct object object; | 290 | struct object object; |
287 | void *buffer; | 291 | void *buffer; |
288 | unsigned long size; | 292 | unsigned long size; |
289 | }; | 293 | }; |
290 | 294 | ||
291 | 295 | ||
292 | struct tree *lookup_tree(const unsigned char *sha1); | 296 | struct tree *lookup_tree(const unsigned char *sha1); |