Re: [PATCH v3 16/20] commit-graph: verify contents match checksum

2018-06-04 Thread Derrick Stolee
On 6/2/2018 11:52 AM, Jakub Narebski wrote: Derrick Stolee writes: 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

Re: [PATCH v3 16/20] commit-graph: verify contents match checksum

2018-06-02 Thread Jakub Narebski
Derrick Stolee writes: > 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

Re: [PATCH v3 16/20] commit-graph: verify contents match checksum

2018-05-30 Thread SZEDER Gábor
> diff --git a/commit-graph.c b/commit-graph.c > index d2b291aca2..a33600c584 100644 > --- a/commit-graph.c > +++ b/commit-graph.c > @@ -841,6 +841,7 @@ void write_commit_graph(const char *obj_dir, > oids.nr =3D 0; > } > =20 > +#define VERIFY_COMMIT_GRAPH_ERROR_HASH 2 > static int

[PATCH v3 16/20] commit-graph: verify contents match checksum

2018-05-24 Thread Derrick Stolee
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