Re: [PATCH 3/5] refs/reftable: add fsck check for number of tables
- From
shejialuo <shejialuo@gmail.com>
- Date
- Aug 26, 2025, 16:44 UTC
- Message-ID
- <aK3kYZA1eq-sCs9b@ArchLinux>
- In-Reply-To
- <20250819-228-reftable-introduce-consistency-checks-v1-3-8b8f6879fa9e@gmail.com>
On Tue, Aug 19, 2025 at 02:21:02PM +0200, Karthik Nayak wrote:
Show 15 quoted lines
> +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.
Thanks, Jialuo