aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/count-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-30 08:00:19 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-30 08:00:19 -0700
commit55547380384c77071b2fc8ff4cc570434a4793d1 (patch)
tree600b21a00ff2b29022d64e9c435c219500a59e1f /builtin/count-objects.c
parentMerge branch 'ob/gpg-interface-cleanup' (diff)
parentpackfile: rename `packfile_store_get_all_packs()` (diff)
downloadgit-55547380384c77071b2fc8ff4cc570434a4793d1.tar.gz
git-55547380384c77071b2fc8ff4cc570434a4793d1.zip
Merge branch 'ps/remove-packfile-store-get-packs'
Two slightly different ways to get at "all the packfiles" in API has been cleaned up. * ps/remove-packfile-store-get-packs: packfile: rename `packfile_store_get_all_packs()` packfile: introduce macro to iterate through packs packfile: drop `packfile_store_get_packs()` builtin/grep: simplify how we preload packs builtin/gc: convert to use `packfile_store_get_all_packs()` object-name: convert to use `packfile_store_get_all_packs()`
Diffstat (limited to 'builtin/count-objects.c')
-rw-r--r--builtin/count-objects.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index f2f407c2a7..18f6e33b6f 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -122,7 +122,6 @@ int cmd_count_objects(int argc,
count_loose, count_cruft, NULL, NULL);
if (verbose) {
- struct packfile_store *packs = the_repository->objects->packfiles;
struct packed_git *p;
unsigned long num_pack = 0;
off_t size_pack = 0;
@@ -130,7 +129,7 @@ int cmd_count_objects(int argc,
struct strbuf pack_buf = STRBUF_INIT;
struct strbuf garbage_buf = STRBUF_INIT;
- for (p = packfile_store_get_all_packs(packs); p; p = p->next) {
+ repo_for_each_pack(the_repository, p) {
if (!p->pack_local)
continue;
if (open_pack_index(p))