summaryrefslogtreecommitdiff
path: root/builtin/fsck.c
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2018-06-27 09:24:42 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-06-27 10:29:10 -0700
commit41df0e307fede8ad01799322af41d8b59d2f6edf (patch)
treea512e999d6f91bf2800bf44e7468a22f37defac3 /builtin/fsck.c
parentcommit-graph: test for corrupted octopus edge (diff)
downloadtgif-41df0e307fede8ad01799322af41d8b59d2f6edf.tar.xz
commit-graph: verify contents match checksum
The commit-graph file ends with a SHA1 hash of the previous contents. If a commit-graph file has errors but the checksum hash is correct, then we know that the problem is a bug in Git and not simply file corruption after-the-fact. Compute the checksum right away so it is the first error that appears, and make the message translatable since this error can be "corrected" by a user by simply deleting the file and recomputing. The rest of the errors are useful only to developers. Be sure to continue checking the rest of the file data if the checksum is wrong. This is important for our tests, as we break the checksum as we modify bytes of the commit-graph file. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fsck.c')
0 files changed, 0 insertions, 0 deletions