mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 10:44:12 +01:00 
			
		
		
		
	
							parent
							
								
									04017f259b
								
							
						
					
					
						commit
						621f2fcadb
					
				@ -290,16 +290,22 @@ Loop:
 | 
			
		||||
				return false, nil, nil, err
 | 
			
		||||
			}
 | 
			
		||||
			defer gitRepo.Close()
 | 
			
		||||
			commit, err := gitRepo.GetCommit(parentCommit)
 | 
			
		||||
			isEmpty, err := gitRepo.IsEmpty()
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				return false, nil, nil, err
 | 
			
		||||
			}
 | 
			
		||||
			if commit.Signature == nil {
 | 
			
		||||
				return false, nil, nil, &ErrWontSign{parentSigned}
 | 
			
		||||
			}
 | 
			
		||||
			verification := ParseCommitWithSignature(ctx, commit)
 | 
			
		||||
			if !verification.Verified {
 | 
			
		||||
				return false, nil, nil, &ErrWontSign{parentSigned}
 | 
			
		||||
			if !isEmpty {
 | 
			
		||||
				commit, err := gitRepo.GetCommit(parentCommit)
 | 
			
		||||
				if err != nil {
 | 
			
		||||
					return false, nil, nil, err
 | 
			
		||||
				}
 | 
			
		||||
				if commit.Signature == nil {
 | 
			
		||||
					return false, nil, nil, &ErrWontSign{parentSigned}
 | 
			
		||||
				}
 | 
			
		||||
				verification := ParseCommitWithSignature(ctx, commit)
 | 
			
		||||
				if !verification.Verified {
 | 
			
		||||
					return false, nil, nil, &ErrWontSign{parentSigned}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user