commit-graph: change test to die on parse, not load
authorDerrick Stolee <redacted>
Tue, 23 Jun 2020 17:47:01 +0000 (17:47 +0000)
committerJunio C Hamano <redacted>
Wed, 24 Jun 2020 00:12:08 +0000 (17:12 -0700)
commit7b671f8c2b6b7de511fd2f6587e4540c25764b61
tree00c7d6510049de4c0e91acb21ac280f417e38b24
parent98037f2bf2fb82845179f3311d8f64f7e27d77c4
commit-graph: change test to die on parse, not load

43d3561 (commit-graph write: don't die if the existing graph is corrupt,
2019-03-25) introduced the GIT_TEST_COMMIT_GRAPH_DIE_ON_LOAD environment
variable. This was created to verify that commit-graph was not loaded
when writing a new non-incremental commit-graph.

An upcoming change wants to load a commit-graph in some valuable cases,
but we want to maintain that we don't trust the commit-graph data when
writing our new file. Instead of dying on load, instead die if we ever
try to parse a commit from the commit-graph. This functionally verifies
the same intended behavior, but allows a more advanced feature in the
next change.

Signed-off-by: Derrick Stolee <redacted>
Signed-off-by: Junio C Hamano <redacted>
commit-graph.c
commit-graph.h
t/t5318-commit-graph.sh
git clone https://git.99rst.org/PROJECT