Re: [PATCH 08/12] t1415: move reffiles specific tests to t0600
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jan 19, 2024, 13:29 UTC
- Message-ID
- <Zap5LM78CdeK5mTR@tanuki>
- In-Reply-To
- <9d10526369525a0ceee2d75742399130ccf885ce.1705521155.git.gitgitgadget@gmail.com>
On Wed, Jan 17, 2024 at 07:52:31PM +0000, John Cai via GitGitGadget wrote:
Show 39 quoted lines
> From: John Cai <johncai86@gmail.com> > > Move this test into t0600 with other reffiles specific tests since it > checks for individua loose refs and thus is specific to the reffiles > backend. > > Signed-off-by: John Cai <johncai86@gmail.com> > --- > t/t0600-reffiles-backend.sh | 20 ++++++++++++++++++++ > t/t1415-worktree-refs.sh | 11 ----------- > 2 files changed, 20 insertions(+), 11 deletions(-) > > diff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh > index 0b28a2cc5ea..8526e5cf987 100755 > --- a/t/t0600-reffiles-backend.sh > +++ b/t/t0600-reffiles-backend.sh > @@ -502,4 +502,24 @@ test_expect_success 'empty reflog' ' > test_must_be_empty err > ' > > +# The 'packed-refs' file is stored directly in .git/. This means it is global > +# to the repository, and can only contain refs that are shared across all > +# worktrees. > +test_expect_success 'refs/worktree must not be packed' ' > + test_commit initial && > + test_commit wt1 && > + test_commit wt2 && > + git worktree add wt1 wt1 && > + git worktree add wt2 wt2 && > + git checkout initial && > + git update-ref refs/worktree/foo HEAD && > + git -C wt1 update-ref refs/worktree/foo HEAD && > + git -C wt2 update-ref refs/worktree/foo HEAD && > + git pack-refs --all && > + test_path_is_missing .git/refs/tags/wt1 && > + test_path_is_file .git/refs/worktree/foo && > + test_path_is_file .git/worktrees/wt1/refs/worktree/foo && > + test_path_is_file .git/worktrees/wt2/refs/worktree/foo > +'
Given that this test exercises git-pack-refs(1), should we move it to t0601-reffiles-pack-refs.sh instead?
Patrick