mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Backport #27437 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		@@ -251,7 +251,6 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
 | 
			
		||||
		isSameRepo = true
 | 
			
		||||
		ci.HeadUser = ctx.Repo.Owner
 | 
			
		||||
		ci.HeadBranch = headInfos[0]
 | 
			
		||||
 | 
			
		||||
	} else if len(headInfos) == 2 {
 | 
			
		||||
		headInfosSplit := strings.Split(headInfos[0], "/")
 | 
			
		||||
		if len(headInfosSplit) == 1 {
 | 
			
		||||
@@ -406,6 +405,9 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
 | 
			
		||||
			return nil
 | 
			
		||||
		}
 | 
			
		||||
		defer ci.HeadGitRepo.Close()
 | 
			
		||||
	} else {
 | 
			
		||||
		ctx.NotFound("ParseCompareInfo", nil)
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ctx.Data["HeadRepo"] = ci.HeadRepo
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user