diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-03-10 08:13:21 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-10 13:16:18 -0700 |
| commit | 74d414c9f14a91a3b7bd04972bf3eb9bbe6fd81b (patch) | |
| tree | 7a267ede2a7630503346248db75be00cfd828f00 /builtin/fsck.c | |
| parent | 228457c9d9f32f000f5c04c36fcce9002f72965a (diff) | |
| download | git-74d414c9f14a91a3b7bd04972bf3eb9bbe6fd81b.tar.gz | |
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>
Diffstat (limited to 'builtin/fsck.c')
| -rw-r--r-- | builtin/fsck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/fsck.c b/builtin/fsck.c index eea1d43647..62c7494bbd 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -399,12 +399,12 @@ static void check_connectivity(void) } /* Look up all the requirements, warn about missing objects.. */ - max = get_max_object_index(); + max = get_max_object_index(the_repository); if (verbose) fprintf_ln(stderr, _("Checking connectivity (%d objects)"), max); for (i = 0; i < max; i++) { - struct object *obj = get_indexed_object(i); + struct object *obj = get_indexed_object(the_repository, i); if (obj) check_object(obj); |
