X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=tree.h;h=9975e88216dc6924c1d6e9ec3c7ae6d90c2df1dd;hb=b17e659dd4007cb1d3eb5ac32b524c0c5ab59601;hp=74fe09d7634661d208f88536cf831c3858766450;hpb=5d6ccf5ce7f28e576a87f6c6f4f99fae90e06db6;p=git.git diff --git a/tree.h b/tree.h index 74fe09d7..9975e882 100644 --- a/tree.h +++ b/tree.h @@ -10,9 +10,11 @@ struct tree_entry_list { 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; @@ -30,4 +32,7 @@ int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size); int parse_tree(struct tree *tree); +/* Parses and returns the tree in the given ent, chasing tags and commits. */ +struct tree *parse_tree_indirect(const unsigned char *sha1); + #endif /* TREE_H */