aboutsummaryrefslogtreecommitdiff
path: root/builtin-read-tree.c
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 /builtin-read-tree.c
parente0c97ca63df2590026fe1f9a76fefba54b291d06 (diff)
downloadgit-136f2e548a34f1f504b0f062f87ddf33e8d6e83b.tar.gz
git-136f2e548a34f1f504b0f062f87ddf33e8d6e83b.tar.xz
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 'builtin-read-tree.c')
-rw-r--r--builtin-read-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 716f79251..6876f3d79 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -39,7 +39,7 @@ static struct tree_entry_list df_conflict_list = {
typedef int (*merge_fn_t)(struct cache_entry **src);
-static int entcmp(char *name1, int dir1, char *name2, int dir2)
+static int entcmp(const char *name1, int dir1, const char *name2, int dir2)
{
int len1 = strlen(name1);
int len2 = strlen(name2);
@@ -67,7 +67,7 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
int src_size = len + 1;
do {
int i;
- char *first;
+ const char *first;
int firstdir = 0;
int pathlen;
unsigned ce_size;