diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-13 11:13:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-13 19:01:01 +0200 |
commit | a973f60dc7c178828e351ec4e68886ffecfbcadc (patch) | |
tree | 1dc78a861d10f3df03ffee3ea0210be5985fd36d /revision.c | |
parent | path: stop relying on `the_repository` when reporting garbage (diff) | |
download | git-a973f60dc7c178828e351ec4e68886ffecfbcadc.tar.xz git-a973f60dc7c178828e351ec4e68886ffecfbcadc.zip |
path: stop relying on `the_repository` in `worktree_git_path()`
When not provided a worktree, then `worktree_git_path()` will fall back
to returning a path relative to the main repository. In this case, we
implicitly rely on `the_repository` to derive the path. Remove this
dependency by passing a `struct repository` as parameter.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/revision.c b/revision.c index 1c0192f522..0b92a13af5 100644 --- a/revision.c +++ b/revision.c @@ -1872,7 +1872,7 @@ void add_index_objects_to_pending(struct rev_info *revs, unsigned int flags) continue; /* current index already taken care of */ if (read_index_from(&istate, - worktree_git_path(wt, "index"), + worktree_git_path(the_repository, wt, "index"), get_worktree_git_dir(wt)) > 0) do_add_index_objects_to_pending(revs, &istate, flags); discard_index(&istate); |