X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=tree.h;h=056bd86fa9e5a62207bd52fbb124f080e8854253;hb=000182eacf99cde27d5916aa415921924b82972c;hp=4d5496de307999f5ada8412259e0e86d2c8092de;hpb=6eb8ae00d4bceaf660a07d8bc5ab8d6ddccbe1af;p=git.git diff --git a/tree.h b/tree.h index 4d5496de..056bd86f 100644 --- a/tree.h +++ b/tree.h @@ -5,13 +5,29 @@ extern const char *tree_type; +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); +int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size); + int parse_tree(struct tree *tree); #endif /* TREE_H */