]> git.ipfire.org Git - thirdparty/git.git/commitdiff
add-interactive: use repo_parse_tree_indirect()
authorRené Scharfe <l.s.r@web.de>
Fri, 9 Jan 2026 21:30:14 +0000 (22:30 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 10 Jan 2026 02:36:16 +0000 (18:36 -0800)
1b374ad71f (add-interactive: stop using `the_repository`, 2024-12-17)
replaced explicit uses of the_repository.  parse_tree_indirect() uses it
internally, though, so call repo_parse_tree_indirect() 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>
add-interactive.c

index 68fc09547dd02ea93f9fe99989e4220673e75883..95ec5a89f8c3d312515701a54d15bb51cc6451bc 100644 (file)
@@ -840,7 +840,7 @@ static int run_revert(struct add_i_state *s, const struct pathspec *ps,
        if (is_initial)
                oidcpy(&oid, s->r->hash_algo->empty_tree);
        else {
-               tree = parse_tree_indirect(&oid);
+               tree = repo_parse_tree_indirect(s->r, &oid);
                if (!tree) {
                        res = error(_("Could not parse HEAD^{tree}"));
                        goto finish_revert;