From: Jeff King Date: Tue, 07 Oct 2025 02:32:42 GMT Subject: Re: [PATCH v5 7/7] refs/reftable: add fsck check for checking the table name Message-ID: <20251007023242.GA2747748@coredump.intra.peff.net> In-Reply-To: <20251006-228-reftable-introduce-consistency-checks-v5-7-f196d386214f@gmail.com> On Mon, Oct 06, 2025 at 04:23:05PM +0200, Karthik Nayak wrote: > +test_expect_success "no errors reported on a well formed repository" ' > + test_when_finished "rm -rf repo" && > + git init repo && > + ( > + cd repo && > + git commit --allow-empty -m initial && > + > + for i in $(test_seq 20) > + do > + git update-ref branch-$i HEAD || return 1 > + done && Did you mean refs/heads/branch-$i here? As it is written, it creates a root ref, and the name does not conform to the usual rules (all-caps, and ending in _HEAD). There are some holes in our checks, which is why it doesn't barf yet, but I have a series to fix that which I hope to send out later this week. > + # The repository should end up with multiple tables. > + test_line_count ">" 1 .git/reftable/tables.list && > + > + git refs verify 2>err && > + test_must_be_empty err > + ) Arguably this verify command should be complaining about the broken names, too. -Peff