diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-13 11:13:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-13 10:01:01 -0700 |
commit | 78f2210b3c8605144d62a90b58e888312f64efc8 (patch) | |
tree | aa927ec5288bffdbe235a1f13bb04435a0fd8b01 /builtin/count-objects.c | |
parent | 169c979771158ddc3310f7a1e0e141fd7d0ed088 (diff) |
path: stop relying on `the_repository` when reporting garbage
We access `the_repository` in `report_linked_checkout_garbage()` both
directly and indirectly via `get_git_dir()`. Remove this dependency by
instead 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 'builtin/count-objects.c')
-rw-r--r-- | builtin/count-objects.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/count-objects.c b/builtin/count-objects.c index 2d4bb5e8d0..ec6098a149 100644 --- a/builtin/count-objects.c +++ b/builtin/count-objects.c @@ -113,7 +113,7 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix) usage_with_options(count_objects_usage, opts); if (verbose) { report_garbage = real_report_garbage; - report_linked_checkout_garbage(); + report_linked_checkout_garbage(the_repository); } for_each_loose_file_in_objdir(get_object_directory(), |