aboutsummaryrefslogtreecommitdiff
path: root/guix/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-06-07 23:06:41 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-07 23:10:46 +0200
commite78275608065ef073775fabb9f1a757da65851f2 (patch)
tree1a732111874006d3c5d9f8f47b0752a538ed3d51 /guix/tests
parent1fd7de45f218ce572a3fe87764ad15927e3dbdc4 (diff)
downloadguix-e78275608065ef073775fabb9f1a757da65851f2.tar
guix-e78275608065ef073775fabb9f1a757da65851f2.tar.gz
git-authenticate: Prevent removal of '.guix-authorizations'.
* guix/git-authenticate.scm (commit-authorized-keys) [parents-have-authorizations-file?, assert-parents-lack-authorizations]: New procedures. Use the latter before returning DEFAULT-AUTHORIZATIONS. * guix/git.scm (false-if-git-not-found): Export. * guix/tests/git.scm (populate-git-repository): Add 'remove' clause. * tests/git-authenticate.scm ("signed commits, .guix-authorizations removed"): New test.
Diffstat (limited to 'guix/tests')
-rw-r--r--guix/tests/git.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
index 5d7056bb53..b8e5f7e643 100644
--- a/guix/tests/git.scm
+++ b/guix/tests/git.scm
@@ -76,6 +76,9 @@ Return DIRECTORY on success."
port)))
(git "add" file)
(loop rest)))
+ ((('remove file) rest ...)
+ (git "rm" "-f" file)
+ (loop rest))
((('commit text) rest ...)
(git "commit" "-m" text)
(loop rest))