]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tree: use repo_parse_tree()
authorRené Scharfe <l.s.r@web.de>
Fri, 9 Jan 2026 21:30:19 +0000 (22:30 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 10 Jan 2026 02:36:17 +0000 (18:36 -0800)
e092073d64 (tree.c: make read_tree*() take 'struct repository *',
2018-11-18) replaced explicit uses of the_repository.  parse_tree() uses
it internally, though, so call repo_parse_tree() instead and hand it the
correct repository.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tree.c

diff --git a/tree.c b/tree.c
index 036f56ca29bb149644bd7a8e64db0d78218ec426..edcf6a284cbb17cc640d09e78bf2fa0e8e20d4f1 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -28,7 +28,7 @@ int read_tree_at(struct repository *r,
        if (depth > r->settings.max_allowed_tree_depth)
                return error("exceeded maximum allowed tree depth");
 
-       if (parse_tree(tree))
+       if (repo_parse_tree(r, tree))
                return -1;
 
        init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size);