Make "struct tree" contain the pointer to the tree buffer

This allows us to avoid allocating information for names etc, because
we can just use the information from the tree buffer directly.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Linus Torvalds
2006-05-29 12:16:12 -07:00
committed by Junio C Hamano
parent e0c97ca63d
commit 136f2e548a
6 changed files with 36 additions and 34 deletions

4
tree.h
View File

@ -12,7 +12,7 @@ struct tree_entry_list {
unsigned symlink : 1;
unsigned zeropad : 1;
unsigned int mode;
char *name;
const char *name;
union {
struct object *any;
struct tree *tree;
@ -22,6 +22,8 @@ struct tree_entry_list {
struct tree {
struct object object;
void *buffer;
unsigned long size;
struct tree_entry_list *entries;
};