Patrick Steinhardt <ps@xxxxxx> writes: > [[PGP Signed Part:Undecided]] > [1. text/plain] > In t1302 we exercise logic around "core.repositoryFormatVersion" and > extensions. These tests are not particularly robust against extensions > like the newly introduced "refStorage" extension. > > Refactor the tests to be more robust: > > - Check the DEFAULT_REPO_FORMAT prereq to determine the expected > repository format version. This helps to ensure that we only need to > update the prereq in a central place when new extensions are added. > > - Use a separate repository to rewrite ".git/config" to test > combinations of the repository format version and extensions. This > ensures that we don't break the main test repository. > > - Do not rewrite ".git/config" when exercising the "preciousObjects" > extension. > > Signed-off-by: Patrick Steinhardt <ps@xxxxxx> > --- > t/t1302-repo-version.sh | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > > diff --git a/t/t1302-repo-version.sh b/t/t1302-repo-version.sh > index 179474fa65..7c680c91c4 100755 > --- a/t/t1302-repo-version.sh > +++ b/t/t1302-repo-version.sh > @@ -79,8 +84,13 @@ mkconfig () { > > while read outcome version extensions; do > test_expect_success "$outcome version=$version $extensions" " > - mkconfig $version $extensions >.git/config && > - check_${outcome} > + test_when_finished 'rm -rf extensions' && > + git init extensions && > + ( > + cd extensions && > + mkconfig $version $extensions >.git/config && Why did you not remove the use of `mkconfig` here? -- Toon