On Sat, May 31, 2025 at 11:39:18AM +0800, shejialuo wrote: > +test_expect_success 'no refs directory of worktree should not cause problems' ' > + test_when_finished "rm -rf repo" && > + git init repo && > + ( > + cd repo && > + test_commit initial && > + > + git worktree add --detach ./worktree && > + # Simulate old directory layout > + rm -rf ./git/worktrees/worktree/refs && FYI. I made a mistake here, it should be ".git/worktrees" but not "./git". > + git refs verify 2>err && > + test_must_be_empty err > + ) > +' > + > test_expect_success 'ref name check should work for multiple worktrees' ' > test_when_finished "rm -rf repo" && > git init repo && > -- > 2.49.0 >