aboutsummaryrefslogtreecommitdiff
path: root/builtin/diff-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/diff-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/diff-tree.c')
-rw-r--r--builtin/diff-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index 49dd4d00eb..740d9a791c 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -52,7 +52,7 @@ static int stdin_diff_trees(struct tree *tree1, const char *p)
if (!isspace(*p++) || parse_oid_hex(p, &oid, &p) || *p)
return error("Need exactly two trees, separated by a space");
tree2 = lookup_tree(the_repository, &oid);
- if (!tree2 || parse_tree(tree2))
+ if (!tree2 || repo_parse_tree(the_repository, tree2))
return -1;
printf("%s %s\n", oid_to_hex(&tree1->object.oid),
oid_to_hex(&tree2->object.oid));