summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 9231b6564f..b5f9648e80 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -873,8 +873,7 @@ static void add_pbase_object(struct tree_desc *tree,
tree = pbase_tree_get(entry.sha1);
if (!tree)
return;
- sub.buf = tree->tree_data;
- sub.size = tree->tree_size;
+ init_tree_desc(&sub, tree->tree_data, tree->tree_size);
add_pbase_object(&sub, down, downlen, fullname);
pbase_tree_put(tree);
@@ -937,8 +936,7 @@ static void add_preferred_base_object(const char *name, unsigned hash)
}
else {
struct tree_desc tree;
- tree.buf = it->pcache.tree_data;
- tree.size = it->pcache.tree_size;
+ init_tree_desc(&tree, it->pcache.tree_data, it->pcache.tree_size);
add_pbase_object(&tree, name, cmplen, name);
}
}