MCPcopy Create free account
hub / github.com/git/git / fill_oids_from_all_packs

Function fill_oids_from_all_packs

commit-graph.c:1999–2026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1997}
1998
1999static 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
2028static void copy_oids_to_commits(struct write_commit_graph_context *ctx)
2029{

Callers 1

write_commit_graphFunction · 0.85

Calls 6

start_delayed_progressFunction · 0.85
odb_prepare_alternatesFunction · 0.85
display_progressFunction · 0.85
stop_progressFunction · 0.85

Tested by

no test coverage detected