From: Eric Sunshine Date: Sat, 23 Feb 2019 09:29:26 GMT Subject: Re: [PATCH 7/8] commit-graph write: don't die if the existing graph is corrupt Message-ID: In-Reply-To: On Fri, Feb 22, 2019 at 6:13 PM Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > > diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh > > @@ -408,7 +414,7 @@ test_expect_success 'detect permission problem' ' > > # "chmod 000 file" does not yield EACCES on e.g. "cat file" > > if ! test -r $objdir/info/commit-graph > > then > > - corrupt_graph_verify "Could not open" > > + NO_WRITE_TEST_BACKUP=1 corrupt_graph_verify "Could not open" > > This would not work as you think it would; corrupt_graph_verify is a > shell function, so you cannot VAR=VAL prefix to export an environment > variable only for the duration of the command. As of a0a630192d (t/check-non-portable-shell: detect "FOO=bar shell_func", 2018-07-13), this sort of problem is correctly flagged by "make test-lint", which typically is run as part of "make test" or "make prove".