Re: [PATCH 7/8] commit-graph write: don't die if the existing graph is corrupt
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 23, 2019, 09:29 UTC
- Message-ID
- <CAPig+cRb78wPKJGjWaMiUkazDK5LpidikDLKR8nbQ-+u1=2w=A@mail.gmail.com>
- In-Reply-To
- <xmqqzhqno1r3.fsf@gitster-ct.c.googlers.com>
On Fri, Feb 22, 2019 at 6:13 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> 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".