mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 18:44:46 +01:00 
			
		
		
		
	Backport #27437 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		
							parent
							
								
									51001d9ffe
								
							
						
					
					
						commit
						a9d547f55b
					
				| @ -252,7 +252,6 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo { | |||||||
| 		isSameRepo = true | 		isSameRepo = true | ||||||
| 		ci.HeadUser = ctx.Repo.Owner | 		ci.HeadUser = ctx.Repo.Owner | ||||||
| 		ci.HeadBranch = headInfos[0] | 		ci.HeadBranch = headInfos[0] | ||||||
| 
 |  | ||||||
| 	} else if len(headInfos) == 2 { | 	} else if len(headInfos) == 2 { | ||||||
| 		headInfosSplit := strings.Split(headInfos[0], "/") | 		headInfosSplit := strings.Split(headInfos[0], "/") | ||||||
| 		if len(headInfosSplit) == 1 { | 		if len(headInfosSplit) == 1 { | ||||||
| @ -407,6 +406,9 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo { | |||||||
| 			return nil | 			return nil | ||||||
| 		} | 		} | ||||||
| 		defer ci.HeadGitRepo.Close() | 		defer ci.HeadGitRepo.Close() | ||||||
|  | 	} else { | ||||||
|  | 		ctx.NotFound("ParseCompareInfo", nil) | ||||||
|  | 		return nil | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	ctx.Data["HeadRepo"] = ci.HeadRepo | 	ctx.Data["HeadRepo"] = ci.HeadRepo | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user