Re: [PATCH 1/6] t1300: mark tests to require default repo format
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jan 9, 2024, 18:41 UTC
- Message-ID
- <ZZ2TdYlcrLN9zckR@nand.local>
- In-Reply-To
- <ec1b5bdd176e6a3f093b76b732fd9e960a7880ca.1704802213.git.ps@pks.im>
On Tue, Jan 09, 2024 at 01:17:04PM +0100, Patrick Steinhardt wrote:
Show 11 quoted lines
> The t1300 test suite exercises the git-config(1) tool. To do so we > overwrite ".git/config" to contain custom contents. While this is easy > enough to do, it may create problems when using a non-default repository > format because we also overwrite the repository format version as well > as any potential extensions. > > Mark these tests with the DEFAULT_REPO_FORMAT prerequisite to avoid the > problem. An alternative would be to carry over mandatory config keys > into the rewritten config file. But the effort does not seem worth it > given that the system under test is git-config(1), which is at a lower > level than the repository format.
I think I am missing something obvious here ;-).
Show 21 quoted lines
> Signed-off-by: Patrick Steinhardt <ps@pks.im> > --- > t/t1300-config.sh | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/t/t1300-config.sh b/t/t1300-config.sh > index f4e2752134..1e953a0fc2 100755 > --- a/t/t1300-config.sh > +++ b/t/t1300-config.sh > @@ -1098,7 +1098,7 @@ test_expect_success SYMLINKS 'symlink to nonexistent configuration' ' > test_must_fail git config --file=linktolinktonada --list > ' > > -test_expect_success 'check split_cmdline return' " > +test_expect_success DEFAULT_REPO_FORMAT 'check split_cmdline return' " > git config alias.split-cmdline-fix 'echo \"' && > test_must_fail git split-cmdline-fix && > echo foo > foo && > @@ -1156,7 +1156,7 @@ test_expect_success 'git -c works with aliases of builtins' ' > test_cmp expect actual > '
Looking at this first test, for example, I see two places where we modify the configuration file:
- git config alias.split-cmdline-fix 'echo \"' - git config branch.main.mergeoptions 'echo \"'
I think I am missing some detail about why we can't do this when we have extensions enabled?
Thanks, Taylor