aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2022-11-08 22:35:26 -0500
committerKyle Meyer <kyle@kyleam.com>2022-11-08 22:35:26 -0500
commit36059e0b881cb1465cb5ad0099e55e00845a8222 (patch)
tree98e91c8780061915eb4bfbbce26a8896e32e358e /test
parent161ab485209ecd0f304e16ca95f8a145327e7ffe (diff)
test: Set protocol.file.allow=always to restore old Git behavior
Under Git v2.38.1, the magit-get and magit-toplevel:submodule tests fail due to clone errors. Both of these tests add a submodule with a _local_ URL. As of a1d4f67c12 (transport: make `protocol.file.allow` be "user" by default, 2022-10-01) [*], Git prevents submodule initialization from "file://" (and bare local) sources by default for security reasons. In the context of Magit's test suite, this isn't a security risk, so teach magit-with-test-directory to add the file protocol to the list of allowed protocols. [*] This commit was brought into Git's maint-* branches for v2.30.X through 2.38.X.
Diffstat (limited to 'test')
-rw-r--r--test/magit-tests.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/magit-tests.el b/test/magit-tests.el
index 0edfebc..786b878 100644
--- a/test/magit-tests.el
+++ b/test/magit-tests.el
@@ -37,7 +37,10 @@
(declare (indent 0) (debug t))
(let ((dir (make-symbol "dir")))
`(let ((,dir (file-name-as-directory (make-temp-file "magit-" t)))
- (process-environment process-environment))
+ (process-environment process-environment)
+ (magit-git-global-arguments
+ (nconc (list "-c" "protocol.file.allow=always")
+ magit-git-global-arguments)))
(push "GIT_AUTHOR_NAME=A U Thor" process-environment)
(push "GIT_AUTHOR_EMAIL=a.u.thor@example.com" process-environment)
(condition-case err