diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-28 22:47:53 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-28 22:47:53 -0700 |
commit | 0a2586c807fadc4b13a741e693471765870f6bb4 (patch) | |
tree | 9c62558c76d02057e71f6152c8d73b9cb1cf536e /tree.h | |
parent | Merge branch 'jc/dirwalk-n-cache-tree' into jc/cache-tree (diff) | |
parent | Remove "tree->entries" tree-entry list from tree parser (diff) | |
download | tgif-0a2586c807fadc4b13a741e693471765870f6bb4.tar.xz |
Merge branch 'lt/tree' into jc/lt-tree-n-cache-tree
* lt/tree: (98 commits)
Remove "tree->entries" tree-entry list from tree parser
Switch "read_tree_recursive()" over to tree-walk functionality
Make "tree_entry" have a SHA1 instead of a union of object pointers
Add raw tree buffer info to "struct tree"
Don't use "sscanf()" for tree mode scanning
git-fetch: avoid using "case ... in (arm)"
mailinfo: skip bogus UNIX From line inside body
mailinfo: More carefully parse header lines in read_one_header_line()
Allow in body headers beyond the in body header prefix.
More accurately detect header lines in read_one_header_line
In handle_body only read a line if we don't already have one.
Refactor commit messge handling.
Move B and Q decoding into check header.
Make read_one_header_line return a flag not a length.
Fix memory leak in "git rev-list --objects"
gitview: Move the console error messages to message dialog
gitview: Add key binding for F5.
Let git-clone to pass --template=dir option to git-init-db.
Make cvsexportcommit create parent directories as needed.
Document current cvsexportcommit limitations.
...
Conflicts:
Makefile, builtin.h, git.c are trivially resolved.
builtin-read-tree.c needed adjustment for the tree
parser change.
Diffstat (limited to 'tree.h')
-rw-r--r-- | tree.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -12,19 +12,19 @@ struct tree_entry_list { unsigned symlink : 1; unsigned zeropad : 1; unsigned int mode; - char *name; - union { - struct object *any; - struct tree *tree; - struct blob *blob; - } item; + const char *name; + const unsigned char *sha1; }; struct tree { struct object object; - struct tree_entry_list *entries; + void *buffer; + unsigned long size; }; +struct tree_entry_list *create_tree_entry_list(struct tree *); +void free_tree_entry_list(struct tree_entry_list *); + struct tree *lookup_tree(const unsigned char *sha1); int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size); @@ -35,7 +35,7 @@ int parse_tree(struct tree *tree); struct tree *parse_tree_indirect(const unsigned char *sha1); #define READ_TREE_RECURSIVE 1 -typedef int (*read_tree_fn_t)(unsigned char *, const char *, int, const char *, unsigned int, int); +typedef int (*read_tree_fn_t)(const unsigned char *, const char *, int, const char *, unsigned int, int); extern int read_tree_recursive(struct tree *tree, const char *base, int baselen, |