MCPcopy Index your code
hub / github.com/git/git / verify_commit_graph

Function verify_commit_graph

commit-graph.c:2916–2946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2914}
2915
2916int verify_commit_graph(struct commit_graph *g, int flags)
2917{
2918 struct progress *progress = NULL;
2919 int local_error = 0;
2920 uint64_t seen = 0;
2921
2922 if (!g) {
2923 graph_report("no commit-graph file loaded");
2924 return 1;
2925 }
2926
2927 if (flags & COMMIT_GRAPH_WRITE_PROGRESS) {
2928 uint64_t total = g->num_commits;
2929 if (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW))
2930 total += g->num_commits_in_base;
2931
2932 progress = start_progress(g->odb_source->odb->repo,
2933 _("Verifying commits in commit graph"),
2934 total);
2935 }
2936
2937 for (; g; g = g->base_graph) {
2938 local_error |= verify_one_commit_graph(g, progress, &seen);
2939 if (flags & COMMIT_GRAPH_VERIFY_SHALLOW)
2940 break;
2941 }
2942
2943 stop_progress(&progress);
2944
2945 return local_error;
2946}
2947
2948void free_commit_graph(struct commit_graph *g)
2949{

Callers 1

graph_verifyFunction · 0.85

Calls 4

graph_reportFunction · 0.85
start_progressFunction · 0.85
verify_one_commit_graphFunction · 0.85
stop_progressFunction · 0.85

Tested by

no test coverage detected