mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 05:25:15 +01:00 
			
		
		
		
	Use correct start and end commits for GetDiffTree (#33816)
Fixes https://github.com/go-gitea/gitea/pull/33514#issuecomment-2702814099 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		
							parent
							
								
									ef18655215
								
							
						
					
					
						commit
						582ad338d7
					
				@ -820,7 +820,7 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if !fileOnly {
 | 
						if !fileOnly {
 | 
				
			||||||
		// note: use mergeBase is set to false because we already have the merge base from the pull request info
 | 
							// note: use mergeBase is set to false because we already have the merge base from the pull request info
 | 
				
			||||||
		diffTree, err := gitdiff.GetDiffTree(ctx, gitRepo, false, pull.MergeBase, headCommitID)
 | 
							diffTree, err := gitdiff.GetDiffTree(ctx, gitRepo, false, startCommitID, endCommitID)
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			ctx.ServerError("GetDiffTree", err)
 | 
								ctx.ServerError("GetDiffTree", err)
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user