| 1997 | } |
| 1998 | |
| 1999 | static void fill_oids_from_all_packs(struct write_commit_graph_context *ctx) |
| 2000 | { |
| 2001 | struct odb_source *source; |
| 2002 | enum object_type type; |
| 2003 | struct odb_for_each_object_options opts = { |
| 2004 | .flags = ODB_FOR_EACH_OBJECT_PACK_ORDER, |
| 2005 | }; |
| 2006 | struct object_info oi = { |
| 2007 | .typep = &type, |
| 2008 | }; |
| 2009 | |
| 2010 | if (ctx->report_progress) |
| 2011 | ctx->progress = start_delayed_progress( |
| 2012 | ctx->r, |
| 2013 | _("Finding commits for commit graph among packed objects"), |
| 2014 | ctx->approx_nr_objects); |
| 2015 | |
| 2016 | odb_prepare_alternates(ctx->r->objects); |
| 2017 | for (source = ctx->r->objects->sources; source; source = source->next) { |
| 2018 | struct odb_source_files *files = odb_source_files_downcast(source); |
| 2019 | packfile_store_for_each_object(files->packed, &oi, add_packed_commits_oi, |
| 2020 | ctx, &opts); |
| 2021 | } |
| 2022 | |
| 2023 | if (ctx->progress_done < ctx->approx_nr_objects) |
| 2024 | display_progress(ctx->progress, ctx->approx_nr_objects); |
| 2025 | stop_progress(&ctx->progress); |
| 2026 | } |
| 2027 | |
| 2028 | static void copy_oids_to_commits(struct write_commit_graph_context *ctx) |
| 2029 | { |
no test coverage detected