Subject: Re: [PATCH 06/10] t0600: fix incomplete prerequisite for a test case

From: Johannes Schindelin <[email-masked]>
Date: Mon, 1 Dec 2025 14:27:35 +0100 (CET)

Hi Patrick,

On Mon, 1 Dec 2025, Patrick Steinhardt wrote:

> On Sat, Nov 29, 2025 at 06:28:22PM +0000, Johannes Schindelin via GitGitGadget wrote:
> > From: Johannes Schindelin <[email-masked]>
> > 
> > The 'symref transaction supports symlinks' test case is guarded by the
> > `SYMLINK` prerequisite because `core.prefersymlinkrefs = true` requires
> > symbolic links to be supported.
> > 
> > However, the `preferSymlinkRefs` feature is not supported on Windows,
> > therefore this test case needs the `MINGW` prerequisite, too.
> > 
> > Signed-off-by: Johannes Schindelin <[email-masked]>
> > ---
> >  t/t0600-reffiles-backend.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh
> > index b11126ed47..74bfa2e9ba 100755
> > --- a/t/t0600-reffiles-backend.sh
> > +++ b/t/t0600-reffiles-backend.sh
> > @@ -467,7 +467,7 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
> >  	esac
> >  '
> >  
> > -test_expect_success SYMLINKS 'symref transaction supports symlinks' '
> > +test_expect_success SYMLINKS,!MINGW 'symref transaction supports symlinks' '
> >  	test_when_finished "git symbolic-ref -d TEST_SYMREF_HEAD" &&
> >  	git update-ref refs/heads/new @ &&
> >  	test_config core.prefersymlinkrefs true &&
> 
> Makes sense. There's a couple more cases where we set this config key:
> 
>   - In a subsequent test in t0600, but there we explicitly set it to
>     "false". So this would naturally be supported by Windows.
> 
>   - In t7201 we set the value to "yes", but we never verify that the
>     written reference is a symbolic link in the first place. I guess
>     that we could rather remove setting the configuration value here, as
>     we are about to deprecate support for symrefs via symbolic links in
>     the first place. But that's certainly outside of the scope of this
>     series.
> 
>   - In t9903 we do the same, but likewise, we don't check whether the
>     written file is a symbolic link.
> 
> So yes, this seems to be the only instance where we actually need to
> adapt tests.

Thank you for doing my homework. I meant to jot it down in my TODO list as
something that I needed to check before sending the series, but I forgot
to jot it down and therefore forgot.

Thanks again!
Johannes