mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Compute inline diff for pull request view, too. Fix #2462
This commit is contained in:
		@@ -349,6 +349,12 @@ func ViewPullFiles(ctx *middleware.Context) {
 | 
			
		||||
	ctx.Data["Diff"] = diff
 | 
			
		||||
	ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
 | 
			
		||||
 | 
			
		||||
	for _, diffFile := range diff.Files {
 | 
			
		||||
		for _, diffSection := range diffFile.Sections {
 | 
			
		||||
			diffSection.ComputeLinesDiff()
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	commit, err := gitRepo.GetCommit(endCommitID)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		ctx.Handle(500, "GetCommit", err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user