mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
git-authenticate: 'commit-authorized-keys' properly handles orphan commits.
Previously it would trigger a wrong-number-of-arguments error for 'lset-intersection'. * guix/git-authenticate.scm (commit-authorized-keys): Add case for when 'commit-parents' returns the empty list.
This commit is contained in:
parent
72357e2170
commit
eef859e853
1 changed files with 5 additions and 2 deletions
|
@ -184,8 +184,11 @@ (define (commit-authorizations commit)
|
|||
default-authorizations)
|
||||
(throw key error)))))
|
||||
|
||||
(apply lset-intersection bytevector=?
|
||||
(map commit-authorizations (commit-parents commit))))
|
||||
(match (commit-parents commit)
|
||||
(() default-authorizations)
|
||||
(parents
|
||||
(apply lset-intersection bytevector=?
|
||||
(map commit-authorizations parents)))))
|
||||
|
||||
(define* (authenticate-commit repository commit keyring
|
||||
#:key (default-authorizations '()))
|
||||
|
|
Loading…
Reference in a new issue