diff options
author | Karthik Nayak <karthik.188@gmail.com> | 2024-12-03 15:43:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-04 08:21:54 +0900 |
commit | cc656f4eb2b7b10bc530c96844909c869bdd1fdf (patch) | |
tree | 24a6ddb8fa0fde090ead24c5b7961faa453b3803 /builtin/count-objects.c | |
parent | 873b00597bbf20c1bcda089a687641167b148fa2 (diff) |
packfile: pass down repository to `has_object[_kept]_pack`
The functions `has_object[_kept]_pack` currently rely 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 these
functions and any related ones.
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
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 04d80887e0..1e89148ed7 100644 --- a/builtin/count-objects.c +++ b/builtin/count-objects.c @@ -67,7 +67,7 @@ static int count_loose(const struct object_id *oid, const char *path, else { loose_size += on_disk_bytes(st); loose++; - if (verbose && has_object_pack(oid)) + if (verbose && has_object_pack(the_repository, oid)) packed_loose++; } return 0; |