X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=tree.h;h=0df065ae363c016b17db26f00b982396baf066db;hb=e70a165d3db26dbab62e3430553a21d5e97b74ec;hp=19b190565957a7a03c34f7efa68a7fe0c6783d04;hpb=08692164e0937352fb2c8aab5a7318facbd07daa;p=git.git diff --git a/tree.h b/tree.h index 19b19056..0df065ae 100644 --- a/tree.h +++ b/tree.h @@ -9,20 +9,26 @@ struct tree_entry_list { struct tree_entry_list *next; unsigned directory : 1; unsigned executable : 1; + unsigned symlink : 1; + unsigned zeropad : 1; + unsigned int mode; char *name; union { + struct object *any; struct tree *tree; struct blob *blob; } item; + struct tree_entry_list *parent; }; struct tree { struct object object; - unsigned has_full_path : 1; struct tree_entry_list *entries; }; -struct tree *lookup_tree(unsigned char *sha1); +struct tree *lookup_tree(const unsigned char *sha1); + +int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size); int parse_tree(struct tree *tree);