mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	@@ -861,7 +861,17 @@ func (pr *PullRequest) testPatch(e Engine) (err error) {
 | 
				
			|||||||
					line := scanner.Text()
 | 
										line := scanner.Text()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					if strings.HasPrefix(line, prefix) {
 | 
										if strings.HasPrefix(line, prefix) {
 | 
				
			||||||
						pr.ConflictedFiles = append(pr.ConflictedFiles, strings.TrimSpace(strings.Split(line[len(prefix):], ":")[0]))
 | 
											var found bool
 | 
				
			||||||
 | 
											var filepath = strings.TrimSpace(strings.Split(line[len(prefix):], ":")[0])
 | 
				
			||||||
 | 
											for _, f := range pr.ConflictedFiles {
 | 
				
			||||||
 | 
												if f == filepath {
 | 
				
			||||||
 | 
													found = true
 | 
				
			||||||
 | 
													break
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
											if !found {
 | 
				
			||||||
 | 
												pr.ConflictedFiles = append(pr.ConflictedFiles, filepath)
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					// only list 10 conflicted files
 | 
										// only list 10 conflicted files
 | 
				
			||||||
					if len(pr.ConflictedFiles) >= 10 {
 | 
										if len(pr.ConflictedFiles) >= 10 {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user