diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-29 22:16:56 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-29 22:16:56 -0700 |
commit | 5029f6458f99cabce6d80bba09da2137f86cc59e (patch) | |
tree | 46cba0c91aa21754158432bf8d8a35b2c1ac5e0e /tree.c | |
parent | Merge branch 'jc/lt-tree-n-cache-tree' into next (diff) | |
parent | Merge branch 'jc/lt-tree-n-cache-tree' into lt/tree-2 (diff) | |
download | tgif-5029f6458f99cabce6d80bba09da2137f86cc59e.tar.xz |
Merge branch 'jc/lt-tree-n-cache-tree' into next
* jc/lt-tree-n-cache-tree:
adjust to the rebased series by Linus.
Remove last vestiges of generic tree_entry_list
Convert fetch.c: process_tree() to raw tree walker
Convert "mark_tree_uninteresting()" to raw tree walker
Remove unused "zeropad" entry from tree_list_entry
fsck-objects: avoid unnecessary tree_entry_list usage
Remove "tree->entries" tree-entry list from tree parser
builtin-read-tree.c: avoid tree_entry_list in prime_cache_tree_rec()
Switch "read_tree_recursive()" over to tree-walk functionality
Make "tree_entry" have a SHA1 instead of a union of object pointers
Make "struct tree" contain the pointer to the tree buffer
Make git-diff-tree indicate when it flushes
Remove unnecessary output from t3600-rm.
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 43 |
1 files changed, 0 insertions, 43 deletions
@@ -201,49 +201,6 @@ int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size) return 0; } -struct tree_entry_list *create_tree_entry_list(struct tree *tree) -{ - struct tree_desc desc; - struct tree_entry_list *ret = NULL; - struct tree_entry_list **list_p = &ret; - - desc.buf = tree->buffer; - desc.size = tree->size; - - while (desc.size) { - unsigned mode; - const char *path; - const unsigned char *sha1; - struct tree_entry_list *entry; - - sha1 = tree_entry_extract(&desc, &path, &mode); - - entry = xmalloc(sizeof(struct tree_entry_list)); - entry->name = path; - entry->sha1 = sha1; - entry->mode = mode; - entry->directory = S_ISDIR(mode) != 0; - entry->executable = (mode & S_IXUSR) != 0; - entry->symlink = S_ISLNK(mode) != 0; - entry->zeropad = *(const char *)(desc.buf) == '0'; - entry->next = NULL; - - update_tree_entry(&desc); - *list_p = entry; - list_p = &entry->next; - } - return ret; -} - -void free_tree_entry_list(struct tree_entry_list *list) -{ - while (list) { - struct tree_entry_list *next = list->next; - free(list); - list = next; - } -} - int parse_tree(struct tree *item) { char type[20]; |