mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-22 14:20:10 -05:00
Revert "Merge branch 'tb/commit-graph-verify-fix' into next"
This reverts commitba45da55f5, reversing changes made to16b87e890a.
This commit is contained in:
@@ -128,16 +128,6 @@ timestamp_t commit_graph_generation(const struct commit *c)
|
||||
return GENERATION_NUMBER_INFINITY;
|
||||
}
|
||||
|
||||
static timestamp_t commit_graph_generation_from_graph(const struct commit *c)
|
||||
{
|
||||
struct commit_graph_data *data =
|
||||
commit_graph_data_slab_peek(&commit_graph_data_slab, c);
|
||||
|
||||
if (!data || data->graph_pos == COMMIT_NOT_FROM_GRAPH)
|
||||
return GENERATION_NUMBER_INFINITY;
|
||||
return data->generation;
|
||||
}
|
||||
|
||||
static struct commit_graph_data *commit_graph_data_at(const struct commit *c)
|
||||
{
|
||||
unsigned int i, nth_slab;
|
||||
@@ -2690,7 +2680,7 @@ static int verify_one_commit_graph(struct repository *r,
|
||||
oid_to_hex(&graph_parents->item->object.oid),
|
||||
oid_to_hex(&odb_parents->item->object.oid));
|
||||
|
||||
generation = commit_graph_generation_from_graph(graph_parents->item);
|
||||
generation = commit_graph_generation(graph_parents->item);
|
||||
if (generation > max_generation)
|
||||
max_generation = generation;
|
||||
|
||||
@@ -2702,17 +2692,14 @@ static int verify_one_commit_graph(struct repository *r,
|
||||
graph_report(_("commit-graph parent list for commit %s terminates early"),
|
||||
oid_to_hex(&cur_oid));
|
||||
|
||||
if (commit_graph_generation_from_graph(graph_commit)) {
|
||||
if (generation_zero == GENERATION_ZERO_EXISTS)
|
||||
graph_report(_("commit-graph has non-zero generation number for commit %s, but zero elsewhere"),
|
||||
oid_to_hex(&cur_oid));
|
||||
generation_zero = GENERATION_NUMBER_EXISTS;
|
||||
} else {
|
||||
if (!commit_graph_generation(graph_commit)) {
|
||||
if (generation_zero == GENERATION_NUMBER_EXISTS)
|
||||
graph_report(_("commit-graph has generation number zero for commit %s, but non-zero elsewhere"),
|
||||
oid_to_hex(&cur_oid));
|
||||
generation_zero = GENERATION_ZERO_EXISTS;
|
||||
}
|
||||
} else if (generation_zero == GENERATION_ZERO_EXISTS)
|
||||
graph_report(_("commit-graph has non-zero generation number for commit %s, but zero elsewhere"),
|
||||
oid_to_hex(&cur_oid));
|
||||
|
||||
if (generation_zero == GENERATION_ZERO_EXISTS)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user