commit-graph: verify required chunks are present
[gitweb.git] / commit-graph.c
index 488216a736c272292641323d10681c6eece1ea3f..26328c3b74a0dc128514817d5387fc4e02cefaca 100644 (file)
@@ -848,5 +848,14 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g)
                return 1;
        }
 
+       verify_commit_graph_error = 0;
+
+       if (!g->chunk_oid_fanout)
+               graph_report("commit-graph is missing the OID Fanout chunk");
+       if (!g->chunk_oid_lookup)
+               graph_report("commit-graph is missing the OID Lookup chunk");
+       if (!g->chunk_commit_data)
+               graph_report("commit-graph is missing the Commit Data chunk");
+
        return verify_commit_graph_error;
 }