aboutsummaryrefslogtreecommitdiff
path: root/t
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 /t
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 't')
-rw-r--r--t/helper/test-cache-tree.c2
-rw-r--r--t/helper/test-match-trees.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/t/helper/test-cache-tree.c b/t/helper/test-cache-tree.c
index 3ae45cec3b..ff61d0ca7e 100644
--- a/t/helper/test-cache-tree.c
+++ b/t/helper/test-cache-tree.c
@@ -41,7 +41,7 @@ int cmd__cache_tree(int argc, const char **argv)
die(_("unable to read index file"));
oidcpy(&oid, &the_repository->index->cache_tree->oid);
- tree = parse_tree_indirect(&oid);
+ tree = repo_parse_tree_indirect(the_repository, &oid);
if (!tree)
die(_("not a tree object: %s"), oid_to_hex(&oid));
diff --git a/t/helper/test-match-trees.c b/t/helper/test-match-trees.c
index e0e2048320..2ed064b971 100644
--- a/t/helper/test-match-trees.c
+++ b/t/helper/test-match-trees.c
@@ -19,10 +19,10 @@ int cmd__match_trees(int ac UNUSED, const char **av)
die("cannot parse %s as an object name", av[1]);
if (repo_get_oid(the_repository, av[2], &hash2))
die("cannot parse %s as an object name", av[2]);
- one = parse_tree_indirect(&hash1);
+ one = repo_parse_tree_indirect(the_repository, &hash1);
if (!one)
die("not a tree-ish %s", av[1]);
- two = parse_tree_indirect(&hash2);
+ two = repo_parse_tree_indirect(the_repository, &hash2);
if (!two)
die("not a tree-ish %s", av[2]);