From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 0/8] safe.bareRepository: default to "explicit" with WITH_BREAKING_CHANGES
Date: Fri, 24 Apr 2026 15:01:09 +0000 [thread overview]
Message-ID: <pull.2098.git.1777042877.gitgitgadget@gmail.com> (raw)
This supersedes my earlier series [*1*] which took the approach of adjusting
individual tests to access bare repositories explicitly.
As Junio suggested [*2*], this series instead takes the approach of setting
safe.bareRepository=all in the test environment's global config whenever
WITH_BREAKING_CHANGES is in effect, so that existing tests continue to work
without individual modifications.
Implementing this turned out to require a number of follow-up adjustments,
because writing to $HOME/.gitconfig has side effects beyond the intended
setting: $HOME is the trash directory, which doubles as the test
repository's working tree, so the file shows up in ls-files and status
output, and tests that manipulate $HOME/.gitconfig for their own purposes
can clobber or remove the setting. Patches 2 through 7 address these
interactions in the affected test scripts.
The final patch flips the safe.bareRepository default to "explicit" under
WITH_BREAKING_CHANGES.
Footnote [*1*]:
https://lore.kernel.org/git/pull.2076.git.1775140403.gitgitgadget@gmail.com/
Footnote [*2*]: https://lore.kernel.org/git/xmqqse98cc51.fsf@gitster.g/
Johannes Schindelin (8):
test-lib: allow bare repository access when breaking changes are
enabled
t7900: do not let `$HOME/.gitconfig` interfere with XDG tests
t1300: remove global config settings injected by test-lib.sh
t1305: use `--git-dir=.` for bare repo in include cycle test
t5601: restore `.gitconfig` after includeIf test
ls-files tests: filter `.gitconfig` from `--others` output
status tests: filter `.gitconfig` from status output
safe.bareRepository: default to "explicit" with WITH_BREAKING_CHANGES
Documentation/BreakingChanges.adoc | 24 +++++++++++++++++
Documentation/config/safe.adoc | 10 +++++--
setup.c | 4 +++
t/t0035-safe-bare-repository.sh | 10 +++++--
t/t1300-config.sh | 7 +++++
t/t1305-config-include.sh | 4 +--
t/t3000-ls-files-others.sh | 4 +++
t/t3001-ls-files-others-exclude.sh | 3 +++
t/t3002-ls-files-dashpath.sh | 2 ++
t/t3009-ls-files-others-nonsubmodule.sh | 1 +
...common-prefixes-and-directory-traversal.sh | 3 ++-
t/t5601-clone.sh | 4 ++-
t/t7060-wtstatus.sh | 3 +--
t/t7061-wtstatus-ignore.sh | 27 +++++++++++++++++++
t/t7064-wtstatus-pv2.sh | 1 +
t/t7104-reset-hard.sh | 2 +-
t/t7508-status.sh | 4 +++
t/t7521-ignored-mode.sh | 1 +
t/t7900-maintenance.sh | 12 +++++++--
t/test-lib-functions.sh | 8 ++++++
t/test-lib.sh | 6 +++++
21 files changed, 127 insertions(+), 13 deletions(-)
base-commit: 94f057755b7941b321fd11fec1b2e3ca5313a4e0
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2098%2Fdscho%2Fsafe-bare-repo-default-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2098/dscho/safe-bare-repo-default-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2098
--
gitgitgadget
next reply other threads:[~2026-04-24 15:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 15:01 Johannes Schindelin via GitGitGadget [this message]
2026-04-24 15:01 ` [PATCH 1/8] test-lib: allow bare repository access when breaking changes are enabled Johannes Schindelin via GitGitGadget
2026-04-24 15:01 ` [PATCH 2/8] t7900: do not let `$HOME/.gitconfig` interfere with XDG tests Johannes Schindelin via GitGitGadget
2026-04-24 15:01 ` [PATCH 3/8] t1300: remove global config settings injected by test-lib.sh Johannes Schindelin via GitGitGadget
2026-04-24 15:01 ` [PATCH 4/8] t1305: use `--git-dir=.` for bare repo in include cycle test Johannes Schindelin via GitGitGadget
2026-04-24 15:01 ` [PATCH 5/8] t5601: restore `.gitconfig` after includeIf test Johannes Schindelin via GitGitGadget
2026-04-24 15:01 ` [PATCH 6/8] ls-files tests: filter `.gitconfig` from `--others` output Johannes Schindelin via GitGitGadget
2026-04-26 0:44 ` Junio C Hamano
2026-04-24 15:01 ` [PATCH 7/8] status tests: filter `.gitconfig` from status output Johannes Schindelin via GitGitGadget
2026-04-24 15:01 ` [PATCH 8/8] safe.bareRepository: default to "explicit" with WITH_BREAKING_CHANGES Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 0/8] " Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 1/8] test-lib: allow bare repository access when breaking changes are enabled Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 2/8] t7900: do not let `$HOME/.gitconfig` interfere with XDG tests Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 3/8] t1300: remove global config settings injected by test-lib.sh Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 4/8] t1305: use `--git-dir=.` for bare repo in include cycle test Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 5/8] t5601: restore `.gitconfig` after includeIf test Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 6/8] ls-files tests: filter `.gitconfig` from `--others` output Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 7/8] status tests: filter `.gitconfig` from status output Johannes Schindelin via GitGitGadget
2026-04-26 14:38 ` [PATCH v2 8/8] safe.bareRepository: default to "explicit" with WITH_BREAKING_CHANGES Johannes Schindelin via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.2098.git.1777042877.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox