aboutsummaryrefslogtreecommitdiff
path: root/builtin/read-tree.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2026-01-09 22:30:21 +0100
committerJunio C Hamano <gitster@pobox.com>2026-01-09 18:36:18 -0800
commitec7a16b14551fed736ecfe0a9d4f6d6f9e03be79 (patch)
tree879e793cbcd59b52d7e3527b6e1db035ef7977d0 /builtin/read-tree.c
parenta8a50f29aeab6cf3cd848caaa8229ab26d542b80 (diff)
downloadgit-ec7a16b14551fed736ecfe0a9d4f6d6f9e03be79.tar.xz
cocci: convert parse_tree functions to repo_ variants
Add and apply a semantic patch to convert calls to parse_tree() and friends to the corresponding variant that takes a repository argument, to allow the functions that implicitly use the_repository to be retired once all potential in-flight topics are settled and converted as well. The changes in .c files were generated by Coccinelle, but I fixed a whitespace bug it would have introduced to builtin/commit.c. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 34f7a59f38..460b21e40a 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -32,7 +32,7 @@ static int list_tree(struct object_id *oid)
if (nr_trees >= MAX_UNPACK_TREES)
die("I cannot read more than %d trees", MAX_UNPACK_TREES);
- tree = parse_tree_indirect(oid);
+ tree = repo_parse_tree_indirect(the_repository, oid);
if (!tree)
return -1;
trees[nr_trees++] = tree;
@@ -268,7 +268,7 @@ int cmd_read_tree(int argc,
cache_tree_free(&the_repository->index->cache_tree);
for (i = 0; i < nr_trees; i++) {
struct tree *tree = trees[i];
- if (parse_tree(tree) < 0)
+ if (repo_parse_tree(the_repository, tree) < 0)
return 128;
init_tree_desc(t+i, &tree->object.oid, tree->buffer, tree->size);
}