Re: [PATCH 3/5] refs/reftable: add fsck check for number of tables
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Sep 1, 2025, 13:52 UTC
- Message-ID
- <CAOLa=ZSVu9Y9MFE8S0xV9YysE53aD3bK2Wx9Q3Cr3UEwGS2JGg@mail.gmail.com>
- In-Reply-To
- <aK3kYZA1eq-sCs9b@ArchLinux>
shejialuo <shejialuo@gmail.com> writes:
Show 21 quoted lines
> On Tue, Aug 19, 2025 at 02:21:02PM +0200, Karthik Nayak wrote: >> +test_expect_success 'table count should be checked' ' >> + test_when_finished "rm -rf repo" && >> + git init repo && >> + ( >> + cd repo && >> + git commit --allow-empty -m initial && >> + >> + git refs verify 2>err && >> + test_must_be_empty err && >> + >> + touch .git/reftable/0x000000002812-0x000000002813-c830a596.ref && >> + >> + test_must_fail git refs verify 2>err && >> + cat >expect <<-EOF && >> + error: $(pwd)/.git/reftable/tables.list: badReftableStackCount: mismatch in number of tables > > This is a bad usage, we should just use `reftable/tables.list`. And this > is a common pattern. We would print the relative path against the ".git" > directory. >
Good point, this can be fixed to 'reftable/tables.list', we don't need to obtain it from the stack.
> Thanks, > Jialuo
Thanks