me
/
guix
Archived
1
0
Fork 0

git-authenticate: Use the 'origin/keyring' branch by default.

Previously one would need to have a worktree for the local 'keyring'
branch.

Reported by reepca and bricewge on #guix.

* build-aux/git-authenticate.scm (load-keyring-from-reference): Use
'branch-lookup' instead of 'reference-lookup'.  Add "origin/" to
REFERENCE.
(authenticate-commits): Have #:keyring-reference default to "keyring".
master
Ludovic Courtès 2020-05-07 11:52:23 +02:00
parent f45baa4a0a
commit 8d65a71e5f
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 2 deletions

View File

@ -337,7 +337,9 @@ may not be ASCII-armored."
(define (load-keyring-from-reference repository reference) (define (load-keyring-from-reference repository reference)
"Load the '.key' files from the tree at REFERENCE in REPOSITORY and return "Load the '.key' files from the tree at REFERENCE in REPOSITORY and return
an OpenPGP keyring." an OpenPGP keyring."
(let* ((reference (reference-lookup repository reference)) (let* ((reference (branch-lookup repository
(string-append "origin/" reference)
BRANCH-REMOTE))
(target (reference-target reference)) (target (reference-target reference))
(commit (commit-lookup repository target)) (commit (commit-lookup repository target))
(tree (commit-tree commit))) (tree (commit-tree commit)))
@ -353,7 +355,7 @@ an OpenPGP keyring."
(define* (authenticate-commits repository commits (define* (authenticate-commits repository commits
#:key #:key
(keyring-reference "refs/heads/keyring") (keyring-reference "keyring")
(report-progress (const #t))) (report-progress (const #t)))
"Authenticate COMMITS, a list of commit objects, calling REPORT-PROGRESS for "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. each of them. Return an alist showing the number of occurrences of each key.