]> git.ipfire.org Git - thirdparty/git.git/commit
refs: pass repo when peeling objects
authorPatrick Steinhardt <ps@pks.im>
Fri, 17 May 2024 08:19:04 +0000 (10:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 May 2024 17:33:39 +0000 (10:33 -0700)
commit30aaff437fddd889ba429b50b96ea4c151c502c5
tree21c333bae42ced8e44e48fc106924e47d87c97b1
parent19c76e8235747a61a703fe3bf7a5e40caf6fa3fa
refs: pass repo when peeling objects

Both `peel_object()` and `peel_iterated_oid()` implicitly rely on
`the_repository` to look up objects. Despite the fact that we want to
get rid of `the_repository`, it also leads to some restrictions in our
ref iterators when trying to retrieve the peeled value for a repository
other than `the_repository`.

Refactor these functions such that both take a repository as argument
and remove the now-unnecessary restrictions.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
20 files changed:
builtin/describe.c
builtin/gc.c
builtin/pack-objects.c
builtin/repack.c
builtin/show-ref.c
commit-graph.c
ls-refs.c
midx-write.c
object.c
object.h
ref-filter.c
refs.c
refs.h
refs/packed-backend.c
refs/ref-cache.c
refs/reftable-backend.c
t/helper/test-reach.c
tag.c
tag.h
upload-pack.c