mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	don't convert buffer to string (#7115)
This commit is contained in:
		@@ -910,7 +910,7 @@ func CreateCodeComment(doer *User, repo *Repository, issue *Issue, content, tree
 | 
				
			|||||||
		if err := GetRawDiffForFile(gitRepo.Path, pr.MergeBase, headCommitID, RawDiffNormal, treePath, patchBuf); err != nil {
 | 
							if err := GetRawDiffForFile(gitRepo.Path, pr.MergeBase, headCommitID, RawDiffNormal, treePath, patchBuf); err != nil {
 | 
				
			||||||
			return nil, fmt.Errorf("GetRawDiffForLine[%s, %s, %s, %s]: %v", err, gitRepo.Path, pr.MergeBase, headCommitID, treePath)
 | 
								return nil, fmt.Errorf("GetRawDiffForLine[%s, %s, %s, %s]: %v", err, gitRepo.Path, pr.MergeBase, headCommitID, treePath)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		patch = CutDiffAroundLine(strings.NewReader(patchBuf.String()), int64((&Comment{Line: line}).UnsignedLine()), line < 0, setting.UI.CodeCommentLines)
 | 
							patch = CutDiffAroundLine(patchBuf, int64((&Comment{Line: line}).UnsignedLine()), line < 0, setting.UI.CodeCommentLines)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return CreateComment(&CreateCommentOptions{
 | 
						return CreateComment(&CreateCommentOptions{
 | 
				
			||||||
		Type:      CommentTypeCode,
 | 
							Type:      CommentTypeCode,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user