t1300: remove global config settings injected by test-lib.sh

Since test-lib.sh now writes `safe.bareRepository=all` to the global config when `WITH_BREAKING_CHANGES` is in effect, that entry shows up in `git config --list` output. Tests in t1300 that expect exact config contents then fail because of this unexpected extra line. Unlike the working-tree contamination fixed in the preceding commits, this is not about the file's existence but about its content leaking into test expectations. Since t1300 does not use bare repositories, simply remove the injected setting in a preparatory step. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Assisted-by: Claude Opus 4.6 Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Apr 26, 2026 at 14:38 UTC 5fe676f44823dce11011b9b3b2214824a876eba4
1 file changed +7
t/t1300-config.sh
+7
@@ -11,6 +11,13 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
11 . ./test-lib.sh
12 . "$TEST_DIRECTORY"/lib-terminal.sh
13
14 +# test-lib.sh may have added global config (e.g. safe.bareRepository)
15 +# that would appear in "git config --list" output and break tests
16 +# that expect exact config contents.
17 +test_expect_success 'remove global config from test-lib.sh' '
18 + test_might_fail git config --global --unset-all safe.bareRepository
19 +'
20 +
21 for mode in legacy subcommands
22 do
23