summaryrefslogtreecommitdiff
path: root/builtin-read-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-read-tree.c')
-rw-r--r--builtin-read-tree.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index e47715538b..82df94101a 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -55,8 +55,7 @@ static void prime_cache_tree_rec(struct cache_tree *it, struct tree *tree)
int cnt;
hashcpy(it->sha1, tree->object.sha1);
- desc.buf = tree->buffer;
- desc.size = tree->size;
+ init_tree_desc(&desc, tree->buffer, tree->size);
cnt = 0;
while (tree_entry(&desc, &entry)) {
if (!S_ISDIR(entry.mode))