X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=tree.h;h=74fe09d7634661d208f88536cf831c3858766450;hb=1b668341db6576d8d851473c74388031b319798a;hp=19b190565957a7a03c34f7efa68a7fe0c6783d04;hpb=08692164e0937352fb2c8aab5a7318facbd07daa;p=git.git diff --git a/tree.h b/tree.h index 19b19056..74fe09d7 100644 --- a/tree.h +++ b/tree.h @@ -9,20 +9,24 @@ struct tree_entry_list { struct tree_entry_list *next; unsigned directory : 1; unsigned executable : 1; + unsigned symlink : 1; + unsigned int mode; char *name; union { 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);