diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-24 14:02:53 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-24 14:02:53 -0700 |
| commit | e2f6fba6fe0ddf09762b865c45b8a004111b7119 (patch) | |
| tree | b5db4843cc0a256a8786d37ad8301aa566856451 /builtin/count-objects.c | |
| parent | Sync with 'master' (diff) | |
| parent | packfile: rename `packfile_store_get_all_packs()` (diff) | |
| download | git-e2f6fba6fe0ddf09762b865c45b8a004111b7119.tar.gz git-e2f6fba6fe0ddf09762b865c45b8a004111b7119.zip | |
Merge branch 'ps/remove-packfile-store-get-packs' into next
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.c | 3 |
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)) |
