Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatheus Valadares <me@m28.io>2022-04-13 18:32:30 +0300
committerJunio C Hamano <gitster@pobox.com>2022-04-13 22:42:51 +0300
commitbb50ec3cc300eeff3aba7a2bea145aabdb477d31 (patch)
tree413c5d0a2a2241e945ce6f60902586772b507dfb /t/t0033-safe-directory.sh
parente47363e5a8bdf5144059d664c45c0975243ef05b (diff)
setup: fix safe.directory key not being checked
It seems that nothing is ever checking to make sure the safe directories in the configs actually have the key safe.directory, so some unrelated config that has a value with a certain directory would also make it a safe directory. Signed-off-by: Matheus Valadares <me@m28.io> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0033-safe-directory.sh')
-rwxr-xr-xt/t0033-safe-directory.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t0033-safe-directory.sh b/t/t0033-safe-directory.sh
index 9380ff3d01..6f33c0dfef 100755
--- a/t/t0033-safe-directory.sh
+++ b/t/t0033-safe-directory.sh
@@ -21,6 +21,11 @@ test_expect_success 'safe.directory does not match' '
expect_rejected_dir
'
+test_expect_success 'path exist as different key' '
+ git config --global foo.bar "$(pwd)" &&
+ expect_rejected_dir
+'
+
test_expect_success 'safe.directory matches' '
git config --global --add safe.directory "$(pwd)" &&
git status