aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/count-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-07-15 15:18:17 -0700
committerJunio C Hamano <gitster@pobox.com>2025-07-15 15:18:18 -0700
commit51b50c55a93205e8cf427a9c5f9c489c6b468542 (patch)
tree2a6698c5263797d86add130f8004053e15e22e7e /builtin/count-objects.c
parentThe ninth batch (diff)
parentodb: rename `read_object_with_reference()` (diff)
downloadgit-51b50c55a93205e8cf427a9c5f9c489c6b468542.tar.gz
git-51b50c55a93205e8cf427a9c5f9c489c6b468542.zip
Merge branch 'ps/object-store'
Code clean-up around object access API. * ps/object-store: odb: rename `read_object_with_reference()` odb: rename `pretend_object_file()` odb: rename `has_object()` odb: rename `repo_read_object_file()` odb: rename `oid_object_info()` odb: trivial refactorings to get rid of `the_repository` odb: get rid of `the_repository` when handling submodule sources odb: get rid of `the_repository` when handling the primary source odb: get rid of `the_repository` in `for_each()` functions odb: get rid of `the_repository` when handling alternates odb: get rid of `the_repository` in `odb_mkstemp()` odb: get rid of `the_repository` in `assert_oid_type()` odb: get rid of `the_repository` in `find_odb()` odb: introduce parent pointers object-store: rename files to "odb.{c,h}" object-store: rename `object_directory` to `odb_source` object-store: rename `raw_object_store` to `object_database`
Diffstat (limited to 'builtin/count-objects.c')
-rw-r--r--builtin/count-objects.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index a88c0c9c09..f687647931 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -80,10 +80,10 @@ static int count_cruft(const char *basename UNUSED, const char *path,
return 0;
}
-static int print_alternate(struct object_directory *odb, void *data UNUSED)
+static int print_alternate(struct odb_source *alternate, void *data UNUSED)
{
printf("alternate: ");
- quote_c_style(odb->path, NULL, stdout, 0);
+ quote_c_style(alternate->path, NULL, stdout, 0);
putchar('\n');
return 0;
}
@@ -159,7 +159,7 @@ int cmd_count_objects(int argc,
printf("prune-packable: %lu\n", packed_loose);
printf("garbage: %lu\n", garbage);
printf("size-garbage: %s\n", garbage_buf.buf);
- foreach_alt_odb(print_alternate, NULL);
+ odb_for_each_alternate(the_repository->objects, print_alternate, NULL);
strbuf_release(&loose_buf);
strbuf_release(&pack_buf);
strbuf_release(&garbage_buf);