commit-graph: verify commit date

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Derrick Stolee
2018-06-27 09:24:40 -04:00
committed by Junio C Hamano
parent 1373e547f7
commit 88968ebf86
2 changed files with 12 additions and 0 deletions

View File

@ -986,6 +986,12 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g)
oid_to_hex(&cur_oid),
graph_commit->generation,
max_generation + 1);
if (graph_commit->date != odb_commit->date)
graph_report("commit date for commit %s in commit-graph is %"PRItime" != %"PRItime,
oid_to_hex(&cur_oid),
graph_commit->date,
odb_commit->date);
}
return verify_commit_graph_error;