]> git.ipfire.org Git - thirdparty/git.git/commit
packfile: pass down repository to `for_each_packed_object`
authorKarthik Nayak <karthik.188@gmail.com>
Tue, 3 Dec 2024 14:44:00 +0000 (15:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Dec 2024 23:21:54 +0000 (08:21 +0900)
commitc87910b96b1223d4a1dfe65c04e03863fadef6bc
tree4fbd9e0eda5efb0be743f8b354e19200253d52a1
parentcc656f4eb2b7b10bc530c96844909c869bdd1fdf
packfile: pass down repository to `for_each_packed_object`

The function `for_each_packed_object` currently relies on the global
variable `the_repository`. To eliminate global variable usage in
`packfile.c`, we should progressively shift the dependency on
the_repository to higher layers. Let's remove its usage from this
function and closely related function `is_promisor_object`.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
builtin/cat-file.c
builtin/fsck.c
builtin/pack-objects.c
builtin/repack.c
builtin/rev-list.c
commit-graph.c
fsck.c
list-objects.c
object-store-ll.h
packfile.c
packfile.h
promisor-remote.c
reachable.c
revision.c
tag.c