mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 13:28:25 +00:00 
			
		
		
		
	Fix #10525 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
This commit is contained in:
		@@ -320,9 +320,6 @@ func PrepareCompareDiff(
 | 
				
			|||||||
	compareInfo.Commits = models.ParseCommitsWithStatus(compareInfo.Commits, headRepo)
 | 
						compareInfo.Commits = models.ParseCommitsWithStatus(compareInfo.Commits, headRepo)
 | 
				
			||||||
	ctx.Data["Commits"] = compareInfo.Commits
 | 
						ctx.Data["Commits"] = compareInfo.Commits
 | 
				
			||||||
	ctx.Data["CommitCount"] = compareInfo.Commits.Len()
 | 
						ctx.Data["CommitCount"] = compareInfo.Commits.Len()
 | 
				
			||||||
	if ctx.Data["CommitCount"] == 0 {
 | 
					 | 
				
			||||||
		ctx.Data["PageIsComparePull"] = false
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if compareInfo.Commits.Len() == 1 {
 | 
						if compareInfo.Commits.Len() == 1 {
 | 
				
			||||||
		c := compareInfo.Commits.Front().Value.(models.SignCommitWithStatuses)
 | 
							c := compareInfo.Commits.Front().Value.(models.SignCommitWithStatuses)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,7 +59,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	{{if .IsNothingToCompare}}
 | 
						{{if .IsNothingToCompare}}
 | 
				
			||||||
    	<div class="ui segment">{{.i18n.Tr "repo.pulls.nothing_to_compare"}}</div>
 | 
					    	<div class="ui segment">{{.i18n.Tr "repo.pulls.nothing_to_compare"}}</div>
 | 
				
			||||||
	{{else if .PageIsComparePull}}
 | 
						{{else if and .PageIsComparePull (gt .CommitCount 0)}}
 | 
				
			||||||
		{{if .HasPullRequest}}
 | 
							{{if .HasPullRequest}}
 | 
				
			||||||
        	<div class="ui segment">
 | 
					        	<div class="ui segment">
 | 
				
			||||||
        		{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
 | 
					        		{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user