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>
This commit is contained in:

committed by
Junio C Hamano

parent
169c979771
commit
78f2210b3c
@ -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(),
|
||||
|
Reference in New Issue
Block a user