mirror of
https://github.com/git-for-windows/git.git
synced 2026-02-03 18:59:59 -06:00
add-interactive: use repo_parse_tree_indirect()
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>
This commit is contained in:
parent
2b74f68ca0
commit
548aaf9d06
@ -840,7 +840,7 @@ static int run_revert(struct add_i_state *s, const struct pathspec *ps,
|
|||||||
if (is_initial)
|
if (is_initial)
|
||||||
oidcpy(&oid, s->r->hash_algo->empty_tree);
|
oidcpy(&oid, s->r->hash_algo->empty_tree);
|
||||||
else {
|
else {
|
||||||
tree = parse_tree_indirect(&oid);
|
tree = repo_parse_tree_indirect(s->r, &oid);
|
||||||
if (!tree) {
|
if (!tree) {
|
||||||
res = error(_("Could not parse HEAD^{tree}"));
|
res = error(_("Could not parse HEAD^{tree}"));
|
||||||
goto finish_revert;
|
goto finish_revert;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user