From ec7a16b14551fed736ecfe0a9d4f6d6f9e03be79 Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Fri, 9 Jan 2026 22:30:21 +0100 Subject: cocci: convert parse_tree functions to repo_ variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'reset.c') diff --git a/reset.c b/reset.c index bb59027181..46e30e6394 100644 --- a/reset.c +++ b/reset.c @@ -163,7 +163,7 @@ int reset_head(struct repository *r, const struct reset_head_opts *opts) goto leave_reset_head; } - tree = parse_tree_indirect(oid); + tree = repo_parse_tree_indirect(the_repository, oid); if (!tree) { ret = error(_("unable to read tree (%s)"), oid_to_hex(oid)); goto leave_reset_head; -- cgit v1.3