mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Move git diff codes from models to services/gitdiff (#7889)
* move git diff codes from models to services/gitdiff * fix template * fix test * fix template
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							b660a732ae
						
					
				
				
					commit
					c03d75fbd5
				
			@@ -24,6 +24,7 @@ import (
 | 
			
		||||
	"code.gitea.io/gitea/modules/pull"
 | 
			
		||||
	"code.gitea.io/gitea/modules/setting"
 | 
			
		||||
	"code.gitea.io/gitea/modules/util"
 | 
			
		||||
	"code.gitea.io/gitea/services/gitdiff"
 | 
			
		||||
 | 
			
		||||
	"github.com/unknwon/com"
 | 
			
		||||
)
 | 
			
		||||
@@ -517,7 +518,7 @@ func ViewPullFiles(ctx *context.Context) {
 | 
			
		||||
		ctx.Data["Reponame"] = pull.HeadRepo.Name
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	diff, err := models.GetDiffRangeWithWhitespaceBehavior(diffRepoPath,
 | 
			
		||||
	diff, err := gitdiff.GetDiffRangeWithWhitespaceBehavior(diffRepoPath,
 | 
			
		||||
		startCommitID, endCommitID, setting.Git.MaxGitDiffLines,
 | 
			
		||||
		setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles,
 | 
			
		||||
		whitespaceFlags[ctx.Data["WhitespaceBehavior"].(string)])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user