mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	account for empty lines in receive-hook message (#10773)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
		@@ -1423,7 +1423,7 @@ func (err *ErrPushRejected) GenerateMessage() {
 | 
			
		||||
		}
 | 
			
		||||
		i += 8
 | 
			
		||||
		nl := strings.IndexByte(err.StdErr[i:], '\n')
 | 
			
		||||
		if nl > 0 {
 | 
			
		||||
		if nl >= 0 {
 | 
			
		||||
			messageBuilder.WriteString(err.StdErr[i : i+nl+1])
 | 
			
		||||
			i = i + nl + 1
 | 
			
		||||
		} else {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user