Subject: Re: [PATCH 3/5] refs/reftable: add fsck check for number of tables

From: shejialuo <[email-masked]>
Date: Wed, 27 Aug 2025 00:44:17 +0800

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.

Thanks,
Jialuo