Skip to content

Commit 548aaf9

Browse files
rscharfegitster
authored andcommitted
add-interactive: use repo_parse_tree_indirect()
1b374ad (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>
1 parent 2b74f68 commit 548aaf9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

add-interactive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ static int run_revert(struct add_i_state *s, const struct pathspec *ps,
840840
if (is_initial)
841841
oidcpy(&oid, s->r->hash_algo->empty_tree);
842842
else {
843-
tree = parse_tree_indirect(&oid);
843+
tree = repo_parse_tree_indirect(s->r, &oid);
844844
if (!tree) {
845845
res = error(_("Could not parse HEAD^{tree}"));
846846
goto finish_revert;

0 commit comments

Comments
 (0)