]> Kevux Git Server - rit/commit
object: stop depending on `the_repository`
authorPatrick Steinhardt <ps@pks.im>
Mon, 10 Mar 2025 07:13:21 +0000 (08:13 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Mar 2025 20:16:18 +0000 (13:16 -0700)
commit74d414c9f14a91a3b7bd04972bf3eb9bbe6fd81b
tree7a267ede2a7630503346248db75be00cfd828f00
parent228457c9d9f32f000f5c04c36fcce9002f72965a
object: stop depending on `the_repository`

There are a couple of functions exposed by "object.c" that implicitly
depend on `the_repository`. Remove this dependency by injecting the
repository via a parameter. Adapt callers accordingly by simply using
`the_repository`, except in cases where the subsystem is already free of
the repository. In that case, we instead pass the repository provided by
the caller's context.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
builtin/fsck.c
builtin/grep.c
builtin/index-pack.c
builtin/log.c
builtin/name-rev.c
builtin/pack-objects.c
builtin/prune.c
midx-write.c
object.c
object.h
pack-bitmap.c
reachable.c
revision.c
shallow.c
upload-pack.c