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 @@ to remove '.guix-authorizations' file") | |||
|               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 '())) | ||||
|  |  | |||
		Reference in a new issue