aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-30 13:34:12 -0800
committerJunio C Hamano <gitster@pobox.com>2024-01-30 13:34:12 -0800
commita8bf3c0cac802487f308f5986620723ee3c27969 (patch)
treeb2074b3100bdfba1cada0cd110b7844f339e38cb /t
parentMerge branch 'jx/remote-archive-over-smart-http' (diff)
parentsetup: allow cwd=.git w/ bareRepository=explicit (diff)
downloadgit-a8bf3c0cac802487f308f5986620723ee3c27969.tar.gz
git-a8bf3c0cac802487f308f5986620723ee3c27969.zip
Merge branch 'kl/allow-working-in-dot-git-in-non-bare-repository'
The "disable repository discovery of a bare repository" check, triggered by setting safe.bareRepository configuration variable to 'explicit', has been loosened to exclude the ".git/" directory inside a non-bare repository from the check. So you can do "cd .git && git cmd" to run a Git command that works on a bare repository without explicitly specifying $GIT_DIR now. * kl/allow-working-in-dot-git-in-non-bare-repository: setup: allow cwd=.git w/ bareRepository=explicit
Diffstat (limited to 't')
-rwxr-xr-xt/t0035-safe-bare-repository.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t0035-safe-bare-repository.sh b/t/t0035-safe-bare-repository.sh
index 038b8b788d..8048856379 100755
--- a/t/t0035-safe-bare-repository.sh
+++ b/t/t0035-safe-bare-repository.sh
@@ -78,4 +78,12 @@ test_expect_success 'no trace when GIT_DIR is explicitly provided' '
expect_accepted_explicit "$pwd/outer-repo/bare-repo"
'
+test_expect_success 'no trace when "bare repository" is .git' '
+ expect_accepted_implicit -C outer-repo/.git
+'
+
+test_expect_success 'no trace when "bare repository" is a subdir of .git' '
+ expect_accepted_implicit -C outer-repo/.git/objects
+'
+
test_done