git-authenticate: 'authenticate-commits' takes a #:keyring parameter.
authorLudovic Courtès <ludo@gnu.org>
Mon, 8 Jun 2020 09:52:15 +0000 (11:52 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 16 Jun 2020 14:10:46 +0000 (16:10 +0200)
* guix/git-authenticate.scm (authenticate-commits): Add #:keyring
parameter.

guix/git-authenticate.scm

index cdb54a0..228d551 100644 (file)
@@ -271,13 +271,13 @@ an OpenPGP keyring."
                                #:key
                                (default-authorizations '())
                                (keyring-reference "keyring")
+                               (keyring (load-keyring-from-reference
+                                         repository keyring-reference))
                                (report-progress (const #t)))
   "Authenticate COMMITS, a list of commit objects, calling REPORT-PROGRESS for
 each of them.  Return an alist showing the number of occurrences of each key.
-The OpenPGP keyring is loaded from KEYRING-REFERENCE in REPOSITORY."
-  (define keyring
-    (load-keyring-from-reference repository keyring-reference))
-
+If KEYRING is omitted, the OpenPGP keyring is loaded from KEYRING-REFERENCE in
+REPOSITORY."
   (fold (lambda (commit stats)
           (report-progress)
           (let ((signer (authenticate-commit repository commit keyring