summaryrefslogtreecommitdiff
path: root/tree.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-05-29 12:16:12 -0700
committerJunio C Hamano <junkio@cox.net>2006-05-29 19:05:02 -0700
commit136f2e548a34f1f504b0f062f87ddf33e8d6e83b (patch)
treee5dcfa1d5325c5bbe1ba8e7f1295a298b3aa7091 /tree.h
parente0c97ca63df2590026fe1f9a76fefba54b291d06 (diff)
downloadgit-136f2e548a34f1f504b0f062f87ddf33e8d6e83b.tar.gz
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>
Diffstat (limited to 'tree.h')
-rw-r--r--tree.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tree.h b/tree.h
index 330ab64bbd..066ac5d5bf 100644
--- a/tree.h
+++ b/tree.h
@@ -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;
};