From: Junio C Hamano Date: Wed, 9 Jul 2025 15:29:08 +0000 (-0700) Subject: Merge branch 'ps/object-store' into ps/object-store-midx X-Git-Tag: v2.51.0-rc0~19^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db0583b3fd18596b8e360b0fd1554ac3e5c15793;p=thirdparty%2Fgit.git Merge branch 'ps/object-store' into ps/object-store-midx * 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` --- db0583b3fd18596b8e360b0fd1554ac3e5c15793 diff --cc builtin/cat-file.c index 4b23fcecbd,08afecbf57..2492a0b6f3 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@@ -489,17 -482,14 +487,17 @@@ static void batch_object_write(const ch data->info.sizep = &data->size; if (pack) - ret = packed_object_info(the_repository, pack, offset, - &data->info); + ret = packed_object_info(the_repository, pack, + offset, &data->info); else - ret = oid_object_info_extended(the_repository, - &data->oid, &data->info, - OBJECT_INFO_LOOKUP_REPLACE); + ret = odb_read_object_info_extended(the_repository->objects, + &data->oid, &data->info, + OBJECT_INFO_LOOKUP_REPLACE); if (ret < 0) { - report_object_status(opt, obj_name, &data->oid, "missing"); + if (data->mode == S_IFGITLINK) + report_object_status(opt, oid_to_hex(&data->oid), &data->oid, "submodule"); + else + report_object_status(opt, obj_name, &data->oid, "missing"); return; } @@@ -881,9 -870,10 +879,9 @@@ static int batch_objects(struct batch_o /* * Expand once with our special mark_query flag, which will prime the - * object_info to be handed to oid_object_info_extended for each + * object_info to be handed to odb_read_object_info_extended for each * object. */ - memset(&data, 0, sizeof(data)); data.mark_query = 1; expand_format(&output, opt->format ? opt->format : DEFAULT_FORMAT, diff --cc builtin/gc.c index 845876ff02,ff551fab43..21bd44e164 --- a/builtin/gc.c +++ b/builtin/gc.c @@@ -1040,8 -1018,8 +1040,8 @@@ int cmd_gc(int argc } if (the_repository->settings.gc_write_commit_graph == 1) - write_commit_graph_reachable(the_repository->objects->odb, + write_commit_graph_reachable(the_repository->objects->sources, - !quiet && !daemonized ? COMMIT_GRAPH_WRITE_PROGRESS : 0, + !opts.quiet && !daemonized ? COMMIT_GRAPH_WRITE_PROGRESS : 0, NULL); if (opts.auto_flag && too_many_loose_objects(&cfg))